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:
Micah Lee 2018-09-20 23:18:17 -07:00
parent ea938e2439
commit 81fa5e052c
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 4 additions and 2 deletions

View file

@ -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)