Mercurial > hg > octave-nkf
changeset 18063:1e9cb13faa7a
ls.m: Strip tailing UNIX file separator when running in Windows environment (bug #40726).
* ls.m: Strip tailing UNIX file separator when running in Windows environment
(bug #40726).
author | Rik <rik@octave.org> |
---|---|
date | Tue, 03 Dec 2013 13:13:44 -0800 |
parents | 832ecfda1d3c |
children | 5cc67f929d06 |
files | scripts/miscellaneous/ls.m |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/ls.m +++ b/scripts/miscellaneous/ls.m @@ -63,6 +63,10 @@ if (ispc () && ! isunix ()) ## shell (cmd.exe) on MinGW uses '^' as escape character args = regexprep (args, '([^\w.*? -])', '^$1'); + ## Strip UNIX directory character which looks like an option to dir cmd. + if (args{end}(end) == '/') + args{end}(end) = ""; + endif else args = regexprep (args, '([^\w.*? -])', '\\$1'); endif