Patch by Thomas Stark to remove blank parameters from exe arguments.
authorDavid Walter Seikel <onefang@gmail.com>
Tue, 20 Feb 2007 10:12:45 +0000 (10:12 +0000)
committerDavid Walter Seikel <onefang@gmail.com>
Tue, 20 Feb 2007 10:12:45 +0000 (10:12 +0000)
SVN revision: 28401

legacy/ecore/src/lib/ecore_desktop/ecore_desktop.c

index 9006fc8..8870553 100644 (file)
@@ -257,7 +257,10 @@ _ecore_desktop_get(const char *file, const char *lang)
                    {
                       *exe = '\0';
                       exe++;
-                      result->exec_params = strdup(exe);
+                      /* trim the parameter string */
+                      for(; isspace(*exe) && ((exe - result->exec) < PATH_MAX) && (*exe != '\0'); exe++);
+                      if(*exe != '\0')
+                         result->exec_params = strdup(exe);
                    }
               }