diff scripts/plot/print.m @ 11014:92bb25c0da9e

When appending, delete temporary files at the end of the ghostscript pipeline.
author Ben Abbott <bpabbott@mac.com>
date Wed, 22 Sep 2010 18:06:21 -0400
parents 064aaf82222f
children 811b51cdddce
line wrap: on
line diff
--- a/scripts/plot/print.m
+++ b/scripts/plot/print.m
@@ -251,8 +251,7 @@
   if (opts.append_to_file)
     [~, ~, ext] = fileparts (opts.ghostscript.output);
     opts.ghostscript.prepend = strcat (tmpnam (), ext);
-    movefile (opts.ghostscript.output, opts.ghostscript.prepend);
-    opts.unlink{end+1} = opts.ghostscript.prepend;
+    copyfile (opts.ghostscript.output, opts.ghostscript.prepend);
   endif
 
   unwind_protect