gnome-commander r1502 - in branches/gcmd-1-3: . src



Author: epiotr
Date: Thu Jan 10 21:32:38 2008
New Revision: 1502
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1502&view=rev

Log:
Run editor application in file's directory

Modified:
   branches/gcmd-1-3/ChangeLog
   branches/gcmd-1-3/src/gnome-cmd-file.cc

Modified: branches/gcmd-1-3/src/gnome-cmd-file.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file.cc	(original)
+++ branches/gcmd-1-3/src/gnome-cmd-file.cc	Thu Jan 10 21:32:38 2008
@@ -739,15 +739,18 @@
 {
     g_return_if_fail (finfo != NULL);
 
-    gchar *fpath = gnome_cmd_file_get_real_path (finfo);
-    gchar *arg = g_shell_quote (fpath);
-    gchar *command = g_strdup_printf (gnome_cmd_data_get_editor (), arg);
+    if (!gnome_cmd_file_is_local (finfo))
+        return;
 
-    run_command (command, FALSE);
+    gchar *fpath = gnome_cmd_file_get_quoted_real_path (finfo);
+    gchar *dpath = gnome_cmd_file_get_dirname (finfo);
+    gchar *command = g_strdup_printf (gnome_cmd_data_get_editor (), fpath);
+
+    run_command_indir (command, dpath, FALSE);
 
     g_free (command);
+    g_free (dpath);
     g_free (fpath);
-    g_free (arg);
 }
 
 



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