mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
samefile_windows(); Return true if the strings are the same upto case differences.
This commit is contained in:
parent
847e906001
commit
80300df3f4
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user