Merge pull request #1191 from gpodder/fix-1190-gio-windows

fix #1190 ERROR: Could not create save_dir on windows with gio
This commit is contained in:
Eric Le Lay 2021-11-06 16:12:11 +01:00 committed by GitHub
commit ec6b63960c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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