From 1695e0314e179c3a095bb117de7506ceae7db443 Mon Sep 17 00:00:00 2001 From: SimplifiedPrivacy Date: Thu, 13 Aug 2026 08:24:33 -0400 Subject: [PATCH] Download of file deletes the temp folder from setup --- core/utils/basic_operations/folder_tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/utils/basic_operations/folder_tools.py b/core/utils/basic_operations/folder_tools.py index 9286c0b..fef3965 100644 --- a/core/utils/basic_operations/folder_tools.py +++ b/core/utils/basic_operations/folder_tools.py @@ -50,6 +50,8 @@ def validate_folder_structure(temp_dir: str, target_folder: str, target_file: st if found_file: if found_file.parent != target_folder: shutil.move(str(found_file), str(target_file_path)) + # finally, remove temp directory, + shutil.rmtree(temp_dir, ignore_errors=True) return True else: return False