summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ntpath.py2
-rw-r--r--Lib/test/test_ntpath.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 826be87..598c64f 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -207,7 +207,7 @@ def splitdrive(p):
empty = _get_empty(p)
if len(p) > 1:
sep = _get_sep(p)
- normp = normcase(p)
+ normp = p.replace(_get_altsep(p), sep)
if (normp[0:2] == sep*2) and (normp[2:3] != sep):
# is a UNC path:
# vvvvvvvvvvvvvvvvvvvv drive letter or UNC path
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 309d59a..94c57b2 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -66,6 +66,9 @@ class TestNtpath(unittest.TestCase):
('', '\\\\conky\\\\mountpoint\\foo\\bar'))
tester('ntpath.splitdrive("//conky//mountpoint/foo/bar")',
('', '//conky//mountpoint/foo/bar'))
+ # Issue #19911: UNC part containing U+0130
+ self.assertEqual(ntpath.splitdrive('//conky/MOUNTPOİNT/foo/bar'),
+ ('//conky/MOUNTPOİNT', '/foo/bar'))
def test_split(self):
tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))