Patch for bug 132388



Hi,

  I've attached a patch for bug #132388 ("Run Application" dialog tries to run directory as command). 
 


Bug Description:


If the user types a directory name into the GNOME Panel's "Run Application"
dialog, the panel simply tries to run the directory as a command in the
user's shell.  This fails, of course, perhaps leaving a message in
".xsession-errors" along the lines of "sh: /var/local: is a directory" or
perhaps "zsh: permission denied: /var/local".

The panel should open up a view of the directory using Nautilus, or perhaps
using whatever gnome-vfs believes is the registered handler for
directories.  Running the directory as a command (and failing silently) is
clearly *not* the right thing to do.

This did behave as expected under the GNOME 2.2.x version of the panel, so
this issue might be considered as a regression.





Satvik Upadhyaya
Kirti Sinha
Sagar Rastogi


-- 
This page made from 100% recycled photons and electrons.
Index: panel-run-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-run-dialog.c,v
retrieving revision 1.19
diff -u -r1.19 panel-run-dialog.c
--- panel-run-dialog.c	21 Jan 2004 13:22:42 -0000	1.19
+++ panel-run-dialog.c	9 Feb 2004 06:39:38 -0000
@@ -259,6 +259,10 @@
 	if (!command_is_executable (command))
 		return FALSE;
 
+        /* Launch nautilus if a directory is entered */        
+	if (g_file_test (command, G_FILE_TEST_IS_DIR))                 
+		command = g_strconcat ("nautilus ", command, NULL);
+
 	argc = 3;
 	argv = g_new0 (char *, 4);
 	argv [0] = gnome_util_user_shell ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]