diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 6060fed88..3f1e88f6b 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -260,7 +260,8 @@ class DownloadItem(QObject): fileobj = open(self._filename, 'wb') except OSError as e: self._die(e.strerror) - self.set_fileobj(fileobj) + else: + self.set_fileobj(fileobj) def set_fileobj(self, fileobj): """"Set the file object to write the download to.