Catch when items have no path

This commit is contained in:
Serene-Arc 2023-09-13 12:00:24 +10:00
parent cd0f2b1aa3
commit 8ba67674cc

View file

@ -1232,7 +1232,7 @@ def update_items(lib, query, album, move, pretend, fields,
affected_albums = set()
for item in items:
# Item deleted?
if not os.path.exists(syspath(item.path)):
if not item.path or not os.path.exists(syspath(item.path)):
ui.print_(format(item))
ui.print_(ui.colorize('text_error', ' deleted'))
if not pretend: