samefile_windows(); Return true if the strings are the same upto case differences.

This commit is contained in:
Kovid Goyal 2012-08-30 19:27:53 +05:30
parent 847e906001
commit 80300df3f4

View File

@ -203,6 +203,11 @@ def samefile_windows(src, dst):
import win32file import win32file
from pywintypes import error from pywintypes import error
samestring = (os.path.normcase(os.path.abspath(src)) ==
os.path.normcase(os.path.abspath(dst)))
if samestring:
return True
def get_fileid(x): def get_fileid(x):
if isbytestring(x): x = x.decode(filesystem_encoding) if isbytestring(x): x = x.decode(filesystem_encoding)
try: try: