]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 16 Dec 2013 12:34:55 +0000 (14:34 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 16 Dec 2013 12:34:55 +0000 (14:34 +0200)
(U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).

Lib/ntpath.py
Lib/test/test_ntpath.py
Misc/NEWS

index 826be87d3c7c5e296dc9ace5f43e1b3daa47875a..598c64f641ae65dfea63eae96988613748cfc3f5 100644 (file)
@@ -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
index 309d59aba399ea29386ea4f6b44ca288ca913a4d..94c57b2188a32e358d377d529266b31ccef9d577 100644 (file)
@@ -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'))
index 73625f3a5a740f0de81692ff340ddc166ea3dd16..c5244d301d13164559d3208a70a8ab1ef13294e8 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
+  (U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).
+
 - Issue #19532: python -m compileall with no filename/directory arguments now
   respects the -f and -q flags instead of ignoring them.