Mercurial > hg > octave-nkf
changeset 20206:10392528396c
run.m: Use single quotes so that '\' isn't an escape sequence (bug #44671).
* run.m: Use single quotes around script name that is sourced so that windows
directory separator '\' isn't interpreted as an escape sequence.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 30 Mar 2015 15:37:58 -0700 |
parents | 185e8dbdaa40 |
children | abf348f41759 |
files | scripts/miscellaneous/run.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/run.m +++ b/scripts/miscellaneous/run.m @@ -64,7 +64,7 @@ d = canonicalize_file_name (d); unwind_protect cd (d); - evalin ("caller", sprintf ('source ("%s%s");', f, ext), + evalin ("caller", sprintf ("source ('%s%s');", f, ext), "rethrow (lasterror ())"); unwind_protect_cleanup if (strcmp (d, pwd ())) @@ -81,7 +81,7 @@ ## Search PATH with null extension ('.' will be stripped and ext = "") script = which ([script "."]); endif - evalin ("caller", sprintf ('source ("%s");', script), + evalin ("caller", sprintf ("source ('%s');", script), "rethrow (lasterror ())"); endif endfunction