mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
no need to rename on a case insensitive filename
This commit is contained in:
parent
499b6b76fc
commit
a6f7276b03
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ Update media table. If file already exists, don't copy."""
|
|||
if not os.path.exists(new):
|
||||
if new.lower() == path.lower():
|
||||
# case insensitive filesystems suck
|
||||
os.rename(path, new.encode(sys.getfilesystemencoding()))
|
||||
pass
|
||||
else:
|
||||
shutil.copy2(path, new.encode(sys.getfilesystemencoding()))
|
||||
newSize = os.stat(new)[stat.ST_SIZE]
|
||||
|
|
Loading…
Reference in a new issue