mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-24 05:31:27 -05:00
Add temp file to cleanup list just once when its first created
This commit is contained in:
parent
b3d53ca2f2
commit
1dde6f6deb
@ -200,11 +200,11 @@ class SendBaseModeWeb:
|
|||||||
self._gzip_compress(filesystem_path, gzip_file.name, 6, None)
|
self._gzip_compress(filesystem_path, gzip_file.name, 6, None)
|
||||||
self.gzip_individual_files[filesystem_path] = gzip_file.name
|
self.gzip_individual_files[filesystem_path] = gzip_file.name
|
||||||
|
|
||||||
file_to_download = self.gzip_individual_files[filesystem_path]
|
|
||||||
filesize = os.path.getsize(self.gzip_individual_files[filesystem_path])
|
|
||||||
|
|
||||||
# Cleanup this temp file
|
# Cleanup this temp file
|
||||||
self.web.cleanup_tempfiles.append(gzip_file)
|
self.web.cleanup_tempfiles.append(gzip_file)
|
||||||
|
|
||||||
|
file_to_download = self.gzip_individual_files[filesystem_path]
|
||||||
|
filesize = os.path.getsize(self.gzip_individual_files[filesystem_path])
|
||||||
else:
|
else:
|
||||||
file_to_download = filesystem_path
|
file_to_download = filesystem_path
|
||||||
filesize = os.path.getsize(filesystem_path)
|
filesize = os.path.getsize(filesystem_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user