mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
don't die when filename case is borked in media check
This commit is contained in:
parent
9332444dfd
commit
cb533d9c02
1 changed files with 4 additions and 1 deletions
|
|
@ -214,7 +214,10 @@ def rebuildMediaDir(deck, deleteRefs=False, dirty=True):
|
|||
shutil.rmtree(path)
|
||||
continue
|
||||
if f in usedFiles:
|
||||
del mediaIds[f]
|
||||
try:
|
||||
del mediaIds[f]
|
||||
except:
|
||||
pass # case errors
|
||||
else:
|
||||
os.unlink(path)
|
||||
unusedFileCount += 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue