diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-14 05:16:30 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-14 05:16:30 (GMT) |
commit | 2d2ea1b431f9cf58aa8ac45052bd2e4cf2502a5c (patch) | |
tree | 4a476efc06de2f3beb77b85e37068dc20995c40c /Lib/nturl2path.py | |
parent | 95cd91c17f4c3ce5eab27551150f5e92ecb1bc22 (diff) | |
download | cpython-2d2ea1b431f9cf58aa8ac45052bd2e4cf2502a5c.zip cpython-2d2ea1b431f9cf58aa8ac45052bd2e4cf2502a5c.tar.gz cpython-2d2ea1b431f9cf58aa8ac45052bd2e4cf2502a5c.tar.bz2 |
Fix Issue11474 - fix url2pathname() handling of '/C|/' on Windows
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): |