summaryrefslogtreecommitdiffstats
path: root/Lib/nturl2path.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2011-04-14 05:18:55 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2011-04-14 05:18:55 (GMT)
commit56f1e2d875109c9f9bef2d3c065a5218d1a9485b (patch)
tree37495413949637ac0b3f36e277adbf9528551943 /Lib/nturl2path.py
parentc1f0577b54869325a15cd787ddfb79479653de15 (diff)
parent2d2ea1b431f9cf58aa8ac45052bd2e4cf2502a5c (diff)
downloadcpython-56f1e2d875109c9f9bef2d3c065a5218d1a9485b.zip
cpython-56f1e2d875109c9f9bef2d3c065a5218d1a9485b.tar.gz
cpython-56f1e2d875109c9f9bef2d3c065a5218d1a9485b.tar.bz2
merge from 3.1
Diffstat (limited to 'Lib/nturl2path.py')
-rw-r--r--Lib/nturl2path.py5
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):