]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
ntpath.samefile fails to detect that "A.TXT" and "a.txt" refer to the same file on...
authorRonald Oussoren <ronaldoussoren@mac.com>
Fri, 6 May 2011 15:11:07 +0000 (17:11 +0200)
committerRonald Oussoren <ronaldoussoren@mac.com>
Fri, 6 May 2011 15:11:07 +0000 (17:11 +0200)
Noticed while researching a buildbot failure due to a patch for issue #10684.

Lib/ntpath.py
Misc/NEWS

index 419342d0c14628d9050d9dba7d191ae350650b03..ec8a7ab23750a3b51d27d7d0cea1c9d746a41aa2 100644 (file)
@@ -654,7 +654,7 @@ except (AttributeError, ImportError):
     # Non-Windows operating systems fake this method with an XP
     # approximation.
     def _getfinalpathname(f):
-        return abspath(f)
+        return normcase(abspath(f))
 
 def samefile(f1, f2):
     "Test whether two pathnames reference the same actual file"
index 827e8373cba3e87f2dad0cb3bb65128e8f126ec6..52d1d61c4443f59deaf9fb135b39565421111055 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,9 @@ Core and Builtins
 Library
 -------
 
+- ntpath.samefile failed to notice that "a.txt" and "A.TXT" refer to the same
+  file on Windows XP. As noticed in issue #10684.
+
 - Issue #12000: When a SSL certificate has a subjectAltName without any
   dNSName entry, ssl.match_hostname() should use the subject's commonName.
   Patch by Nicolas Bareil.