Move the cleanup() function from Onionshare class to Web class, so that the list of files to be cleaned up is always available (needed for website temp files)

This commit is contained in:
Miguel Jacq 2021-05-04 16:21:42 +10:00
parent 659ed83853
commit 04019389da
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
10 changed files with 40 additions and 38 deletions

View file

@ -497,7 +497,7 @@ class ShareModeWeb(SendBaseModeWeb):
self.gzip_etag = make_etag(f)
# Make sure the gzip file gets cleaned up when onionshare stops
self.cleanup_filenames.append(self.gzip_filename)
self.web.cleanup_filenames.append(self.gzip_filename)
self.is_zipped = False
@ -524,7 +524,7 @@ class ShareModeWeb(SendBaseModeWeb):
self.download_etag = make_etag(f)
# Make sure the zip file gets cleaned up when onionshare stops
self.cleanup_filenames.append(self.zip_writer.zip_filename)
self.web.cleanup_filenames.append(self.zip_writer.zip_filename)
self.is_zipped = True