gnome-commander r1501 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1501 - in trunk: . src
- Date: Thu, 10 Jan 2008 21:32:21 +0000 (GMT)
Author: epiotr
Date: Thu Jan 10 21:32:21 2008
New Revision: 1501
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1501&view=rev
Log:
Run editor application in file's directory
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-file.cc
Modified: trunk/src/gnome-cmd-file.cc
==============================================================================
--- trunk/src/gnome-cmd-file.cc (original)
+++ trunk/src/gnome-cmd-file.cc Thu Jan 10 21:32:21 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]