From 77d5b29c76c6c0dc76c223d416b3204fa12060ff Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 1 Sep 2019 19:59:00 -0700 Subject: [PATCH] Clear the file list every time a share starts --- onionshare/web/send_base_mode.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onionshare/web/send_base_mode.py b/onionshare/web/send_base_mode.py index 80f9e315..68f6aeca 100644 --- a/onionshare/web/send_base_mode.py +++ b/onionshare/web/send_base_mode.py @@ -29,6 +29,7 @@ class SendBaseModeWeb: self.files = {} # This is only the root files and dirs, as opposed to all of them self.root_files = {} + self.cleanup_filenames = [] self.file_info = {'files': [], 'dirs': []} @@ -114,6 +115,10 @@ class SendBaseModeWeb: """ self.common.log("BaseModeWeb", "build_file_list") + # Clear the list of files + self.files = {} + self.root_files = {} + # Loop through the files for filename in filenames: basename = os.path.basename(filename.rstrip('/'))