mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-24 22:40:36 -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
574ef19515
commit
0ea31d39f7
2 changed files with 4 additions and 2 deletions
|
@ -120,6 +120,7 @@ def main(cwd=None):
|
||||||
print(strings._("preparing_files"))
|
print(strings._("preparing_files"))
|
||||||
try:
|
try:
|
||||||
web.set_file_info(filenames)
|
web.set_file_info(filenames)
|
||||||
|
if web.is_zipped:
|
||||||
app.cleanup_filenames.append(web.download_filename)
|
app.cleanup_filenames.append(web.download_filename)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print(e.strerror)
|
print(e.strerror)
|
||||||
|
|
|
@ -47,6 +47,7 @@ class CompressThread(QtCore.QThread):
|
||||||
# Cancelled
|
# Cancelled
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if self.mode.web.is_zipped:
|
||||||
self.mode.app.cleanup_filenames.append(self.mode.web.download_filename)
|
self.mode.app.cleanup_filenames.append(self.mode.web.download_filename)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
self.error.emit(e.strerror)
|
self.error.emit(e.strerror)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue