make sure unused media exist before deleting them

This commit is contained in:
Soren I. Bjornstad 2014-06-20 19:41:56 -05:00
parent 71ff86e3f3
commit 5b61db7d0a

View file

@ -982,6 +982,7 @@ will be lost. Continue?"""))
mdir = self.col.media.dir()
for f in unused:
path = os.path.join(mdir, f)
if os.path.exists(path):
send2trash(path)
tooltip(_("Deleted."))
diag.close()