# HG changeset patch # User Rik # Date 1427755078 25200 # Node ID 10392528396cb05fdd4fde7dcafb651379dac465 # Parent 185e8dbdaa40435b8eb76a78841420bbad85a8aa 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. diff --git a/scripts/miscellaneous/run.m b/scripts/miscellaneous/run.m --- 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