Fix exception when downloading links without name.
We also set a default name to prevent "is a directory" errors. This is a regression introduced in 8f33fcfc52cf598d0aa11a347992c87010d3e37a. Fixes #682.
This commit is contained in:
parent
6d879bbca3
commit
a345b02729
@ -73,6 +73,7 @@ Fixed
|
|||||||
- Various fixes for deprecated key bindings and auto-migrations.
|
- Various fixes for deprecated key bindings and auto-migrations.
|
||||||
- Workaround for qutebrowser not starting when there are NUL-bytes in the history (because of a currently unknown bug)
|
- Workaround for qutebrowser not starting when there are NUL-bytes in the history (because of a currently unknown bug)
|
||||||
- Fixed handling of keybindings containing Ctrl/Meta on OS X.
|
- Fixed handling of keybindings containing Ctrl/Meta on OS X.
|
||||||
|
- Fixed crash when downloading an URL without filename (e.g. magnet links) via "Save as...".
|
||||||
|
|
||||||
https://github.com/The-Compiler/qutebrowser/releases/tag/v0.2.1[v0.2.1]
|
https://github.com/The-Compiler/qutebrowser/releases/tag/v0.2.1[v0.2.1]
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
@ -686,6 +686,9 @@ class DownloadManager(QAbstractListModel):
|
|||||||
if fileobj is not None or filename is not None:
|
if fileobj is not None or filename is not None:
|
||||||
return self.fetch_request(request, page, fileobj, filename,
|
return self.fetch_request(request, page, fileobj, filename,
|
||||||
auto_remove, suggested_fn)
|
auto_remove, suggested_fn)
|
||||||
|
if suggested_fn is None:
|
||||||
|
suggested_fn = 'qutebrowser-download'
|
||||||
|
else:
|
||||||
encoding = sys.getfilesystemencoding()
|
encoding = sys.getfilesystemencoding()
|
||||||
suggested_fn = utils.force_encoding(suggested_fn, encoding)
|
suggested_fn = utils.force_encoding(suggested_fn, encoding)
|
||||||
q = self._prepare_question()
|
q = self._prepare_question()
|
||||||
|
Loading…
Reference in New Issue
Block a user