diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-14 05:20:41 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-14 05:20:41 (GMT) |
commit | 99e97f92c6b4993275fc84b76018374281467e91 (patch) | |
tree | 78d54cd6a2302f5defa17090ba5a0e454bbfc9a9 /Lib/nturl2path.py | |
parent | c470a0c744d484b707cc14bc92883bb2ee8c32c8 (diff) | |
parent | 56f1e2d875109c9f9bef2d3c065a5218d1a9485b (diff) | |
download | cpython-99e97f92c6b4993275fc84b76018374281467e91.zip cpython-99e97f92c6b4993275fc84b76018374281467e91.tar.gz cpython-99e97f92c6b4993275fc84b76018374281467e91.tar.bz2 |
merge from 3.2.
Fix closes Issue1147.
Diffstat (limited to 'Lib/nturl2path.py')
-rw-r--r-- | Lib/nturl2path.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/nturl2path.py b/Lib/nturl2path.py index ce9c3d3..511dcec 100644 --- a/Lib/nturl2path.py +++ b/Lib/nturl2path.py @@ -27,9 +27,12 @@ def url2pathname(url): drive = comp[0][-1].upper() components = comp[1].split('/') path = drive + ':' - for comp in components: + for comp in components: if comp: path = path + '\\' + urllib.parse.unquote(comp) + # Issue #11474 - handing url such as |c/| + if path.endswith(':') and url.endswith('/'): + path += '\\' return path def pathname2url(p): |