Remove useless use of G_SPAWN_FILE_AND_ARGV_ZERO

This commit is contained in:
Pierre Pronchery 2018-10-25 21:02:32 -03:00
parent 828efd04aa
commit 9675ce6ea9

View File

@ -973,9 +973,8 @@ static void _on_icon_open_with(gpointer data)
DesktopIcon * desktopicon = data;
GtkWidget * dialog;
char * filename = NULL;
char * argv[] = { NULL, NULL, NULL, NULL };
const unsigned int flags = G_SPAWN_SEARCH_PATH
| G_SPAWN_FILE_AND_ARGV_ZERO;
char * argv[] = { NULL, NULL, NULL };
const unsigned int flags = G_SPAWN_SEARCH_PATH;
GError * error = NULL;
dialog = gtk_file_chooser_dialog_new(_("Open with..."), NULL,
@ -989,8 +988,7 @@ static void _on_icon_open_with(gpointer data)
if(filename == NULL)
return;
argv[0] = filename;
argv[1] = filename;
argv[2] = desktopicon->path;
argv[1] = desktopicon->path;
if(g_spawn_async(NULL, argv, NULL, flags, NULL, NULL, NULL, &error)
!= TRUE)
{