more cleanup fallbacks
This commit is contained in:
parent
709e067e14
commit
3a1b3a5c3c
2 changed files with 10 additions and 3 deletions
|
|
@ -198,7 +198,7 @@ def run_scan():
|
|||
for id in gone:
|
||||
i = Item.get(id)
|
||||
path = i.get_path()
|
||||
if path and not os.path.exists(path):
|
||||
if not path or not os.path.exists(path):
|
||||
logger.debug('cleaning orphaned record %s %s', i, path)
|
||||
i.remove_file()
|
||||
missing = ids - library_items
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue