From 0dfdd422a2bfa6305c7a02c183b6f2e5ce6b9c59 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 19 Jun 2014 21:27:57 +0200 Subject: [PATCH] Prevent double-deleting file in downloads --- qutebrowser/browser/downloads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 6d52560a7..a355abc1a 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -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()