From 3d7e11520e5993b2adf9b809a8342084053988ae Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 16 Dec 2013 14:34:55 +0200 Subject: =?UTF-8?q?Issue=20#19911:=20ntpath.splitdrive()=20now=20correctly?= =?UTF-8?q?=20processes=20the=20'=C4=B0'=20character=20(U+0130,=20LATIN=20?= =?UTF-8?q?CAPITAL=20LETTER=20I=20WITH=20DOT=20ABOVE).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lib/ntpath.py | 2 +- Lib/test/test_ntpath.py | 3 +++ Misc/NEWS | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) 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')) diff --git a/Misc/NEWS b/Misc/NEWS index 73625f3..c5244d3 100644 --- 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. -- cgit v0.12