changeset 18987:082063dc2165 stable

ls.m: Fix bug listing directories with spaces in name (bug #42920). * ls.m: Escape spaces in directory names before passing to system command.
author Rik <rik@octave.org>
date Tue, 05 Aug 2014 17:46:31 -0700
parents 1197f04eec09
children 0b657f4e7780 a66548dc07b0
files scripts/miscellaneous/ls.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/ls.m	Tue Jul 15 00:14:18 2014 +0100
+++ b/scripts/miscellaneous/ls.m	Tue Aug 05 17:46:31 2014 -0700
@@ -64,7 +64,7 @@
       ## shell (cmd.exe) on MinGW uses '^' as escape character
       args = regexprep (args, '([^\w.*? -])', '^$1');
     else
-      args = regexprep (args, '([^\w.*? -])', '\\$1');
+      args = regexprep (args, '([^\w.*?-])', '\\$1');
     endif
     args = sprintf ("%s ", args{:});
   else