mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-02 20:04:43 +00:00
Add url2pathname workaround for Windows.
This commit is contained in:
parent
08e1b055aa
commit
502430489a
1 changed files with 5 additions and 1 deletions
|
|
@ -69,7 +69,11 @@ def get_os_filename (path):
|
|||
"""Return filesystem path for given URL path."""
|
||||
if os.name == 'nt':
|
||||
path = prepare_urlpath_for_nt(path)
|
||||
return urllib.url2pathname(fileutil.pathencode(path))
|
||||
res = urllib.url2pathname(fileutil.pathencode(path))
|
||||
if os.name == 'nt' and res.endswith(':') and len(res) == 2:
|
||||
# Work around http://bugs.python.org/issue11474
|
||||
res += os.sep
|
||||
return res
|
||||
|
||||
|
||||
def is_absolute_path (path):
|
||||
|
|
|
|||
Loading…
Reference in a new issue