From 18ae7d7cd7f0cc9dcd787441b7a925a0fd722ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Sat, 15 Jul 2023 20:48:06 +0200 Subject: [PATCH] Fix remove done job --- scan_to_paperless/process.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scan_to_paperless/process.py b/scan_to_paperless/process.py index c3248bb5..13326ac8 100755 --- a/scan_to_paperless/process.py +++ b/scan_to_paperless/process.py @@ -1842,6 +1842,8 @@ def main() -> None: save_config(config, config_file_name) elif job_type == scan_to_paperless.status.JobType.DOWN: + assert name is not None + root_folder = os.path.join(os.environ.get("SCAN_SOURCE_FOLDER", "/source"), name) shutil.rmtree(root_folder) elif job_type == scan_to_paperless.status.JobType.CODE: assert name is not None