Comment 5 for bug 911146

Revision history for this message
su_v (suv-lp) wrote :

> When I want to open a .eps file with something like
>
> inkscape file.eps
>
> inkscape tries to open the file from /tmp instead of the current
> directory (if the file doesn't exist, I get a ghostscript error from
> ps2pdf, which is the same error as when ps2pdf is run manually).

Opening EPS files on the command line with relative paths was broken in the previous stable releases (Inkscape 0.48 - 0.48.3.1), and only was fixed in the most recent bug fix release 0.48.4:
- Bug #695120 “cannot open relative paths using script extensions from command line”
  <https://bugs.launchpad.net/inkscape/+bug/695120>

> According to strace, inkscape does a chdir to /tmp before running
> ps2pdf on the argument, hence the problem.

AFAIU Inkscape does not changedir into /TMP - it passes the absolute path names of the temporary file copies in $TMPDIR to ps2pdf. Handling of PS/EPS files with relative paths on the command line was broken in 0.48 due to other changes which make Inkscape change directory into $XDG_CONFIG/inkscape/extensions (not $TMPDIR) before spawning the interpreter for the script extension (python in the case of PS/EPS files).

(Note: I haven't tested the proposed patch from comment #2 yet with current trunk or stable 0.48.4)