Fix prompt for download directory when turned off.
This commit is contained in:
parent
95483f73d8
commit
c1c5b0f2b4
@ -720,7 +720,7 @@ class DownloadManager(QAbstractListModel):
|
|||||||
prompt_download_directory = config.get(
|
prompt_download_directory = config.get(
|
||||||
'storage', 'prompt-download-directory')
|
'storage', 'prompt-download-directory')
|
||||||
if not prompt_download_directory and not fileobj:
|
if not prompt_download_directory and not fileobj:
|
||||||
filename = config.get('storage', 'download-directory')
|
filename = _download_dir()
|
||||||
|
|
||||||
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,
|
return self.fetch_request(request,
|
||||||
@ -733,6 +733,7 @@ class DownloadManager(QAbstractListModel):
|
|||||||
else:
|
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()
|
||||||
q.default = _path_suggestion(suggested_fn)
|
q.default = _path_suggestion(suggested_fn)
|
||||||
message_bridge = objreg.get('message-bridge', scope='window',
|
message_bridge = objreg.get('message-bridge', scope='window',
|
||||||
@ -814,7 +815,7 @@ class DownloadManager(QAbstractListModel):
|
|||||||
prompt_download_directory = config.get('storage',
|
prompt_download_directory = config.get('storage',
|
||||||
'prompt-download-directory')
|
'prompt-download-directory')
|
||||||
if not prompt_download_directory and not fileobj:
|
if not prompt_download_directory and not fileobj:
|
||||||
filename = config.get('storage', 'download-directory')
|
filename = _download_dir()
|
||||||
|
|
||||||
if filename is not None:
|
if filename is not None:
|
||||||
download.set_filename(filename)
|
download.set_filename(filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user