diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 622e255f9..a706d92dd 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -38,6 +38,8 @@ Fixed authentication dialogs) - Fixed crash when a notification/geolocation prompt is answered after closing the tab it belongs to. +- Fixed crash when downloading a file without any path information (e.g a + magnet link). v0.5.1 ------ diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 448ab120e..8c977fb34 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -774,7 +774,10 @@ class DownloadManager(QAbstractListModel): # https://bugreports.qt.io/browse/QTBUG-42757 request.setAttribute(QNetworkRequest.CacheLoadControlAttribute, QNetworkRequest.AlwaysNetwork) + suggested_fn = urlutils.filename_from_url(request.url()) + if suggested_fn is None: + suggested_fn = 'qutebrowser-download' # We won't need a question if a filename or fileobj is already given if fileobj is None and filename is None: diff --git a/tests/integration/data/downloads/issue1243.html b/tests/integration/data/downloads/issue1243.html new file mode 100644 index 000000000..d8acd22d3 --- /dev/null +++ b/tests/integration/data/downloads/issue1243.html @@ -0,0 +1,10 @@ + + +
+ +