summaryrefslogtreecommitdiffstats
path: root/Lib/nturl2path.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/nturl2path.py')
-rw-r--r--Lib/nturl2path.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/nturl2path.py b/Lib/nturl2path.py
index 61852af..6453f20 100644
--- a/Lib/nturl2path.py
+++ b/Lib/nturl2path.py
@@ -55,16 +55,11 @@ def pathname2url(p):
if p[:4] == '\\\\?\\':
p = p[4:]
if p[:4].upper() == 'UNC\\':
- p = '\\' + p[4:]
+ p = '\\\\' + p[4:]
elif p[1:2] != ':':
raise OSError('Bad path: ' + p)
if not ':' in p:
# No drive specifier, just convert slashes and quote the name
- if p[:2] == '\\\\':
- # path is something like \\host\path\on\remote\host
- # convert this to ////host/path/on/remote/host
- # (notice doubling of slashes at the start of the path)
- p = '\\\\' + p
components = p.split('\\')
return urllib.parse.quote('/'.join(components))
comp = p.split(':', maxsplit=2)