Prevent double-deleting file in downloads
This commit is contained in:
parent
684154dd7d
commit
0dfdd422a2
@ -186,7 +186,7 @@ class DownloadItem(QObject):
|
||||
self.reply.deleteLater()
|
||||
if self.fileobj is not None:
|
||||
self.fileobj.close()
|
||||
if self.filename is not None:
|
||||
if self.filename is not None and os.path.exists(self.filename):
|
||||
os.remove(self.filename)
|
||||
self.finished.emit()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user