Comment 6 for bug 911146

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

> AFAIU Inkscape does not changedir into /TMP - it passes the absolute path names of the temporary
> file copies in $TMPDIR to ps2pdf.

From share/extensions/run_command.py:

    # ps2pdf may attempt to write to the current directory, which may not
    # be writeable, so we switch to the temp directory first.
    try:
        os.chdir(tempfile.gettempdir())

and share/extensions/ps2pdf-ext.py:

import sys
from run_command import run

cmd = 'ps2pdf'
if (sys.argv[1] == "--dEPSCrop=true"): cmd += ' -dEPSCrop '

run((cmd+' "%s" "%%s"') % sys.argv[-1].replace("%","%%"), "ps2pdf")

It clearly changes into /tmp before running ps2pdf.

Adrian