mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
make sure unused media exist before deleting them
This commit is contained in:
parent
71ff86e3f3
commit
5b61db7d0a
1 changed files with 2 additions and 1 deletions
|
|
@ -982,7 +982,8 @@ will be lost. Continue?"""))
|
|||
mdir = self.col.media.dir()
|
||||
for f in unused:
|
||||
path = os.path.join(mdir, f)
|
||||
send2trash(path)
|
||||
if os.path.exists(path):
|
||||
send2trash(path)
|
||||
tooltip(_("Deleted."))
|
||||
diag.close()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue