# HG changeset patch # User Ben Abbott # Date 1330088270 18000 # Node ID 61cc4c715962a650740d24d0bc3d796280e7b028 # Parent cbcaf5602469ac3c7a82d4106f8c21ffc48bc671 Replace file-separater "/" with "\" for MinGW MSYS shell. * __print_parse_opts__.m: For the print() utilities (ghostscript, epstool, fig2dev, pstoedit) full-file names replace file-separater "/" with "\" for MinGW MSYS shell. diff --git a/scripts/plot/private/__print_parse_opts__.m b/scripts/plot/private/__print_parse_opts__.m --- a/scripts/plot/private/__print_parse_opts__.m +++ b/scripts/plot/private/__print_parse_opts__.m @@ -423,8 +423,17 @@ %! assert (opts.figure, 5); function cmd = __quote_path__ (cmd) - if (any (cmd == " ") && ! (cmd(1) == """" && cmd(end) == """")) - cmd = strcat ("""", strrep (cmd, """", """"""), """"); + if (! isempty (cmd)) + is_quoted = all (cmd([1, end]) == "'"); + if (! is_quoted) + dos_shell = ! isunix () && ispc (); + if (dos_shell && any (cmd == "/")) + cmd = strrep (cmd, "/", "\\"); + endif + if (any (cmd == " ")) + cmd = strcat ("""", strrep (cmd, """", """"""), """"); + endif + endif endif endfunction