changeset 27346:1effc78e7cd1

open.m: Allow files with space in their path to be open. * sysdep.cc (F__open_with_system_app__): Quote file path on unices.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 20 Aug 2019 16:39:48 +0200
parents 8ff5628d8b55
children 1807acfe2150
files libinterp/corefcn/sysdep.cc
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/sysdep.cc	Mon Jun 10 21:45:59 2019 +0200
+++ b/libinterp/corefcn/sysdep.cc	Tue Aug 20 16:39:48 2019 +0200
@@ -222,6 +222,9 @@
   // ShellExecute returns a value greater than 32 if successful.
   return octave_value (reinterpret_cast<ptrdiff_t> (status) > 32);
 #else
+  // Quote file path
+  file = "\"" + file + "\"";
+
 #  if defined (__APPLE__)
 #    define FSYSTEM_OPEN_STR "open "
 #  else