Drop usage of `url_without_fragment` in favor of `url`

`url_to_path` discards fragment anyway (5th element of
urllib_parse.urlsplit)
This commit is contained in:
Chris Hunt 2019-09-19 20:07:25 -04:00
parent 2aeed371e5
commit 767b028724
1 changed files with 2 additions and 2 deletions

View File

@ -883,7 +883,7 @@ def is_dir_url(link):
first.
"""
link_path = url_to_path(link.url_without_fragment)
link_path = url_to_path(link.url)
return os.path.isdir(link_path)
@ -1115,7 +1115,7 @@ def unpack_file_url(
If download_dir is provided and link points to a file, make a copy
of the link file inside download_dir.
"""
link_path = url_to_path(link.url_without_fragment)
link_path = url_to_path(link.url)
# If it's a url to a local directory
if is_dir_url(link):
if os.path.isdir(location):