octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49718] Octave crashes on print/saveas etc whe


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #49718] Octave crashes on print/saveas etc when installed on a directory with parenthesis
Date: Wed, 28 Aug 2019 16:52:45 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #33, bug #49718 (project octave):

@John: Thank you. I think the two following changes (m files only) should
help:


--- a/scripts/plot/util/print.m Tue Aug 27 22:51:03 2019 +0200
+++ b/scripts/plot/util/print.m Wed Aug 28 22:40:13 2019 +0200
@@ -805,7 +805,7 @@
              "print: 'gs' (Ghostscript) is required for specified output
format, but binary is not available in PATH");
     endif
 
-    [status, devlist] = system (sprintf ("%s -h", opts.ghostscript.binary));
+    [status, devlist] = system (sprintf ('"%s" -h',
opts.ghostscript.binary));
     if (isempty (strfind (devlist, "eps2write")))
       epsdevice = "epswrite";
     else
diff -r 996229be0045 scripts/plot/util/private/__opengl_print__.m
--- a/scripts/plot/util/private/__opengl_print__.m      Tue Aug 27 22:51:03
2019 +0200
+++ b/scripts/plot/util/private/__opengl_print__.m      Wed Aug 28 22:40:13
2019 +0200
@@ -83,7 +83,7 @@
         svgcmd = opts.svgconvert_cmd (opts, opts.ghostscript.device);
       endif
       if (! isempty (svgcmd))
-        pipeline = {sprintf(svgcmd, "svg", opts.name)};
+        pipeline = {sprintf(undo_string_escapes  (svgcmd), "svg",
opts.name)};
       else
         pipeline = {sprintf('cat > "%s"', opts.name)};
       endif
@@ -137,7 +137,7 @@
         tmp = tempname ();
         opts.ghostscript.source = tmp;
         opts.unlink = [opts.unlink tmp];
-        svgcmd = sprintf (svgcmd, "pdf", tmp);
+        svgcmd = sprintf (undo_string_escapes  (svgcmd), "pdf", tmp);
       endif



I attached the corresponding updated patch.

@Dmitri: My version of ghostscript does have both ps2write and eps2write.

(file #47405)
    _______________________________________________________

Additional Item Attachment:

File name: quote_popen4.patch             Size:7 KB
    <https://savannah.gnu.org/file/quote_popen4.patch?file_id=47405>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?49718>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]