Strip trailing slashes from localname.
This commit is contained in:
parent
09d9339efb
commit
9b8db0d8ef
1 changed files with 1 additions and 0 deletions
|
@ -346,6 +346,7 @@ def basename_from_url(url):
|
|||
Determine the local filename appropriate for a URL.
|
||||
'''
|
||||
localname = urllib.parse.unquote(url)
|
||||
localname = localname.rstrip('/')
|
||||
localname = localname.split('?')[0]
|
||||
localname = localname.split('/')[-1]
|
||||
return localname
|
||||
|
|
Loading…
Reference in a new issue