vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
547 stars 90 forks source link

Missing slash in temporary file path #310

Closed showermat closed 2 years ago

showermat commented 2 years ago

I recently (currently Asymptote 2.79) started having an issue where an invocation like:

asy /tmp/tmp_9w9tq5q -o /tmp/asd.svg

would lead to an error message like:

/usr/share/asymptote/graph.asy: 427.3: runtime: Cannot write to /tmptexput.log

Sure enough, strace confirms that Asymptote is trying to open /tmptexput.log. Changing the invocation to:

asy /tmp/tmp_9w9tq5q -o /tmp/x/asd.svg

succeeds, and strace shows Asymptote opening /tmp/xtexput.log.

I've only taken a cursory look at the code, but I expect this is a problem on or around picture.cc:365, where a / separator is not being added.