From 0d6ca0fe6bc40d22fed3a8542b549794e970ed57 Mon Sep 17 00:00:00 2001 From: Luna Midori Date: Sun, 24 Nov 2024 08:08:07 -0800 Subject: [PATCH] made it so that filemanager cleans up after itself on upload... --- Webserver/Programs/File_manager/file_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Webserver/Programs/File_manager/file_manager.py b/Webserver/Programs/File_manager/file_manager.py index aebcd65..da054f6 100644 --- a/Webserver/Programs/File_manager/file_manager.py +++ b/Webserver/Programs/File_manager/file_manager.py @@ -291,7 +291,7 @@ def main(args): shutil.copy2(working_item, temp_working_item) spinner.succeed(text=f"Moved {working_item} to {temp_working_item}") - + spinner.start(text=f"Packing {temp_working_item}") build_tar(temp_working_item) spinner.succeed(text=f"Packed {temp_working_item}") @@ -302,6 +302,8 @@ def main(args): bytes_to_upload = f.read() upload_to_midori_ai(bytes_to_upload) + + os.rmdir(temp_workfolder) else: print("Please pack the files before uploading...")