From 0c4bc8a69f2850b0a37d5bb5e7da91da5f5672b0 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 2 Mar 2022 16:03:00 +0100 Subject: [PATCH] Moved tmpdir for swash run to local storage rather than tmpfs --- swash/processing/swash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swash/processing/swash.py b/swash/processing/swash.py index be20683..3c4208d 100644 --- a/swash/processing/swash.py +++ b/swash/processing/swash.py @@ -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)