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)
|
shutil.rmtree(path)
|
||||||
continue
|
continue
|
||||||
if f in usedFiles:
|
if f in usedFiles:
|
||||||
|
try:
|
||||||
del mediaIds[f]
|
del mediaIds[f]
|
||||||
|
except:
|
||||||
|
pass # case errors
|
||||||
else:
|
else:
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
unusedFileCount += 1
|
unusedFileCount += 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue