diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index afa175a26..d7f5b62bc 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -41,6 +41,7 @@ Fixed - The cursor now moves to the end when input elements are selected with QtWebEngine - Download suffixes like (1) are now correctly stripped with QtWebEngine - Crash when trying to print a tab which was closed in the meantime +- Crash when trying to open a file twice on Windows v0.10.0 ------- diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 8a1a7853a..0e6a7af4f 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -529,7 +529,11 @@ class AbstractDownloadItem(QObject): if filename is None: # pragma: no cover log.downloads.error("No filename to open the download!") return - utils.open_file(filename, cmdline) + # By using a singleshot timer, we ensure that we return fast. This + # is important on systems where process creation takes long, as + # otherwise the prompt might hang around and cause bugs + # (see issue #2296) + QTimer.singleShot(0, lambda: utils.open_file(filename, cmdline)) def _ensure_can_set_filename(self, filename): """Make sure we can still set a filename."""