Skip to content

Commit 47a8f23

Browse files
authored
Update nturl2path.py
1 parent 3b78409 commit 47a8f23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/nturl2path.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def pathname2url(p):
4646
# C:\foo\bar\spam.foo
4747
# becomes
4848
# ///C:/foo/bar/spam.foo
49+
# Normalize path separators to backslashes first
50+
p = p.replace('/', '\\')
4951
import ntpath
5052
import urllib.parse
5153
# First, clean up some special forms. We are going to sacrifice

0 commit comments

Comments
 (0)