mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Only add the download_filename to cleanup_filenames (which get deleted) if the file is zipped up. Otherwise, OnionShare deletes the original file
This commit is contained in:
parent
ea938e2439
commit
81fa5e052c
@ -120,7 +120,8 @@ def main(cwd=None):
|
||||
print(strings._("preparing_files"))
|
||||
try:
|
||||
web.set_file_info(filenames)
|
||||
app.cleanup_filenames.append(web.download_filename)
|
||||
if web.is_zipped:
|
||||
app.cleanup_filenames.append(web.download_filename)
|
||||
except OSError as e:
|
||||
print(e.strerror)
|
||||
sys.exit(1)
|
||||
|
@ -47,7 +47,8 @@ class CompressThread(QtCore.QThread):
|
||||
# Cancelled
|
||||
pass
|
||||
|
||||
self.mode.app.cleanup_filenames.append(self.mode.web.download_filename)
|
||||
if self.mode.web.is_zipped:
|
||||
self.mode.app.cleanup_filenames.append(self.mode.web.download_filename)
|
||||
except OSError as e:
|
||||
self.error.emit(e.strerror)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user