summaryrefslogtreecommitdiff
path: root/legacy/efreet
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/efreet')
-rw-r--r--legacy/efreet/src/lib/efreet_desktop_command.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/legacy/efreet/src/lib/efreet_desktop_command.c b/legacy/efreet/src/lib/efreet_desktop_command.c
index 8a615b6ce4..bf97f8fdfa 100644
--- a/legacy/efreet/src/lib/efreet_desktop_command.c
+++ b/legacy/efreet/src/lib/efreet_desktop_command.c
@@ -351,12 +351,14 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
351 int size = PATH_MAX; 351 int size = PATH_MAX;
352 int file_added = 0; 352 int file_added = 0;
353 Efreet_Desktop_Command_File *file = eina_list_data_get(l); 353 Efreet_Desktop_Command_File *file = eina_list_data_get(l);
354 int single;
354 355
355 exec = malloc(size); 356 exec = malloc(size);
356 if (!exec) goto error; 357 if (!exec) goto error;
357 p = command->desktop->exec; 358 p = command->desktop->exec;
358 len = 0; 359 len = 0;
359 360
361 single = 0;
360 while (*p) 362 while (*p)
361 { 363 {
362 if (len >= size - 1) 364 if (len >= size - 1)
@@ -385,6 +387,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
385 &len, file, *p); 387 &len, file, *p);
386 if (!exec) goto error; 388 if (!exec) goto error;
387 file_added = 1; 389 file_added = 1;
390 single = 1;
388 } 391 }
389 break; 392 break;
390 case 'F': 393 case 'F':
@@ -395,6 +398,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
395 { 398 {
396 exec = efreet_desktop_command_append_multiple(exec, &size, 399 exec = efreet_desktop_command_append_multiple(exec, &size,
397 &len, command, *p); 400 &len, command, *p);
401 fprintf(stderr, "EXE: '%s'\n", exec);
398 if (!exec) goto error; 402 if (!exec) goto error;
399 file_added = 1; 403 file_added = 1;
400 } 404 }
@@ -465,8 +469,11 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
465#endif 469#endif
466 exec[len++] = '\0'; 470 exec[len++] = '\0';
467 471
468 execs = eina_list_append(execs, exec); 472 if ((single) || (!execs))
469 exec = NULL; 473 {
474 execs = eina_list_append(execs, exec);
475 exec = NULL;
476 }
470 477
471 /* If no file was added, then the Exec field doesn't contain any file 478 /* If no file was added, then the Exec field doesn't contain any file
472 * fields (fFuUdDnN). We only want to run the app once in this case. */ 479 * fields (fFuUdDnN). We only want to run the app once in this case. */