Fix filename with a misconfigured XDG_DOWNLOAD_DIR

'filename' is the relative path we got from the broken config file.
Instead of using the garbage, let's just drop it and use the suggested
name (self.basename) instead.
This commit is contained in:
Florian Bruhin 2016-09-09 18:41:50 +02:00
parent a5793695de
commit 433a8a8ced

View File

@ -587,8 +587,8 @@ class DownloadItem(QObject):
" your home directory.",
)
# fall back to $HOME as download_dir
self._filename = create_full_filename(
self.basename, os.path.expanduser(os.path.join('~', filename)))
self._filename = create_full_filename(self.basename,
os.path.expanduser('~'))
self.basename = os.path.basename(self._filename)
last_used_directory = os.path.dirname(self._filename)