# HG changeset patch # User Rik # Date 1407285991 25200 # Node ID 082063dc2165c71bb25457c7cb7db81fdb068595 # Parent 1197f04eec09708e5890065ea6dff322d3306d66 ls.m: Fix bug listing directories with spaces in name (bug #42920). * ls.m: Escape spaces in directory names before passing to system command. diff -r 1197f04eec09 -r 082063dc2165 scripts/miscellaneous/ls.m --- 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