[gnome-commander/gcmd-1-12] Use quoted name when executin an executable file



commit 77757398eb508fb0aa26ef36c4cae3c46c19db77
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Tue Mar 9 23:13:07 2021 +0100

    Use quoted name when executin an executable file

 NEWS                  | 1 +
 doc/C/releases.xml    | 3 +++
 src/gnome-cmd-file.cc | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/NEWS b/NEWS
index 922d93a0..886771e3 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ New features:
 Bug fixes:
  * Fixed issue #12 (Ask for the second time when trying to delete non-empty directory)
  * Fixed issue #97 ("Execute" not shown in file popup menu for executable files)
+ * Fixed issue #98 ("Execute" doesn't work on files with space in filename)
 
 New or updated translations:
  * ...
diff --git a/doc/C/releases.xml b/doc/C/releases.xml
index 4e6f7ed9..73defa46 100644
--- a/doc/C/releases.xml
+++ b/doc/C/releases.xml
@@ -35,6 +35,9 @@
                         <listitem>
                             <para>Fixed issue #97 ("Execute" not shown in file popup menu for executable 
files)</para>
                         </listitem>
+                        <listitem>
+                            <para>Fixed issue #98 ("Execute" doesn't work on files with space in 
filename)</para>
+                        </listitem>
                     </itemizedlist>
                 </para>
                 <para>New features:</para>
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 2c5d71d7..82cee2f8 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -1027,7 +1027,7 @@ void GnomeCmdFile::execute()
 {
     gchar *fpath = get_real_path();
     gchar *dpath = g_path_get_dirname (fpath);
-    gchar *cmd = g_strdup_printf ("./%s", info->name);
+    gchar *cmd = g_strdup_printf ("./%s", this->get_quoted_name());
 
     run_command_indir (cmd, dpath, app_needs_terminal (this));
 


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