We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3a81cb commit 7973aacCopy full SHA for 7973aac
Lib/nturl2path.py
@@ -24,14 +24,14 @@ def url2pathname(url):
24
# convert this to \\host\path\on\remote\host
25
# (notice halving of slashes at the start of the path)
26
url = url[2:]
27
- return urllib.parse.unquote(url.replace('/', '\\'))
+ return urllib.parse.unquote(url).replace('/', '\\')
28
comp = url.split('|')
29
if len(comp) != 2 or comp[0][-1] not in string.ascii_letters:
30
error = 'Bad URL: ' + url
31
raise OSError(error)
32
drive = comp[0][-1].upper()
33
- tail = comp[1].replace('/', '\\')
34
- path = drive + ':' + urllib.parse.unquote(tail)
+ tail = urllib.parse.unquote(comp[1])
+ path = drive + ':' + tail.replace('/', '\\')
35
return path
36
37
def pathname2url(p):
0 commit comments