Strip trailing slash when getting path from URL.
This commit is contained in:
parent
359b886ba0
commit
b4a695d5b8
@ -55,7 +55,9 @@ def parse_content_disposition(reply):
|
||||
is_inline = content_disposition.is_inline()
|
||||
# Then try to get filename from url
|
||||
if not filename:
|
||||
filename = reply.url().path()
|
||||
path = reply.url().path()
|
||||
if path is not None:
|
||||
filename = path.rstrip('/')
|
||||
# If that fails as well, use a fallback
|
||||
if not filename:
|
||||
filename = 'qutebrowser-download'
|
||||
|
Loading…
Reference in New Issue
Block a user