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 574ef19515
commit 0ea31d39f7
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)