db/update/playlist: remove empty playlist directories

This commit is contained in:
Max Kellermann 2021-10-13 19:12:02 +02:00
parent 9200fa6d06
commit cd5c1f3f45

View File

@ -94,6 +94,9 @@ UpdateWalk::UpdatePlaylistFile(Directory &parent, std::string_view name,
directory->AddSong(std::move(db_song));
}
}
if (directory->IsEmpty())
editor.LockDeleteDirectory(directory);
} catch (...) {
FmtError(update_domain,
"Failed to scan playlist '{}': {}",