From 07661b1eae5a4031896927d9a93cf45b4c282aa2 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 25 Jan 2017 19:08:31 +0100 Subject: [PATCH] Formats: Generate tempfile in same directory to ensure rename works. --- boxes/formats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boxes/formats.py b/boxes/formats.py index 7f06be0..6f8c4aa 100644 --- a/boxes/formats.py +++ b/boxes/formats.py @@ -89,7 +89,7 @@ class Formats: ps.adjustDocumentMedia() if fmt not in ("svg", "ps"): - fd, tmpfile = tempfile.mkstemp() + fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(filename)) cmd = [self.pstoedit] + self.formats[fmt] + [filename, tmpfile] err = subprocess.call(cmd)