fix 1190 ERROR: Could not create save_dir on windows

"C:\gpodder-xxx\config\Downloads" results in
scheme="c" and path="\gpodder-xxx\config\Downloads"
(not double backslash)
This commit is contained in:
Eric Le Lay 2021-11-28 22:02:10 +01:00
parent fc98f3f95f
commit b8065cadf7
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ def is_absolute_url(url):
try:
parsed = urllib.parse.urlparse(url)
# fix #1190: when parsing a windows path, scheme=drive_letter, path=\rest_of_path
return parsed.scheme and not parsed.path.startswith("\\\\")
return parsed.scheme and not parsed.path.startswith("\\")
except ValueError:
return False