1
Fork 0

Moved tmpdir for swash run to local storage rather than tmpfs

This commit is contained in:
Edgar P. Burkhart 2022-03-02 16:03:00 +01:00
parent 4ec58f4fa8
commit 0c4bc8a69f
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -11,7 +11,7 @@ config.read("config.ini")
inp = pathlib.Path(config.get("swash", "input"))
out = pathlib.Path(config.get("swash", "out"))
with tempfile.TemporaryDirectory(prefix="swash_") as tmp_raw:
with tempfile.TemporaryDirectory(prefix="swash_", dir=".") as tmp_raw:
tmpdir = pathlib.Path(tmp_raw)
shutil.copy2(inp, tmpdir)
@ -25,4 +25,4 @@ with tempfile.TemporaryDirectory(prefix="swash_") as tmp_raw:
if out.exists():
shutil.rmtree(out)
shutil.copytree(tmpdir, out)
shutil.move(tmpdir, out)