db/update/Walk: adjust lamba indent
This commit is contained in:
parent
6f1a4a73b7
commit
0779333064
@ -69,46 +69,46 @@ UpdateWalk::RemoveExcludedFromDirectory(Directory &directory,
|
|||||||
const ScopeDatabaseLock protect;
|
const ScopeDatabaseLock protect;
|
||||||
|
|
||||||
directory.ForEachChildSafe([&](Directory &child){
|
directory.ForEachChildSafe([&](Directory &child){
|
||||||
const auto name_fs =
|
const auto name_fs =
|
||||||
AllocatedPath::FromUTF8(child.GetName());
|
AllocatedPath::FromUTF8(child.GetName());
|
||||||
|
|
||||||
if (name_fs.IsNull() || exclude_list.Check(name_fs)) {
|
if (name_fs.IsNull() || exclude_list.Check(name_fs)) {
|
||||||
editor.DeleteDirectory(&child);
|
editor.DeleteDirectory(&child);
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
directory.ForEachSongSafe([&](Song &song){
|
directory.ForEachSongSafe([&](Song &song){
|
||||||
assert(&song.parent == &directory);
|
assert(&song.parent == &directory);
|
||||||
|
|
||||||
const auto name_fs = AllocatedPath::FromUTF8(song.filename);
|
const auto name_fs = AllocatedPath::FromUTF8(song.filename);
|
||||||
if (name_fs.IsNull() || exclude_list.Check(name_fs)) {
|
if (name_fs.IsNull() || exclude_list.Check(name_fs)) {
|
||||||
editor.DeleteSong(directory, &song);
|
editor.DeleteSong(directory, &song);
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
UpdateWalk::PurgeDeletedFromDirectory(Directory &directory) noexcept
|
UpdateWalk::PurgeDeletedFromDirectory(Directory &directory) noexcept
|
||||||
{
|
{
|
||||||
directory.ForEachChildSafe([&](Directory &child){
|
directory.ForEachChildSafe([&](Directory &child){
|
||||||
if (child.IsMount() || DirectoryExists(storage, child))
|
if (child.IsMount() || DirectoryExists(storage, child))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
editor.LockDeleteDirectory(&child);
|
editor.LockDeleteDirectory(&child);
|
||||||
|
|
||||||
modified = true;
|
modified = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
directory.ForEachSongSafe([&](Song &song){
|
directory.ForEachSongSafe([&](Song &song){
|
||||||
if (!directory_child_is_regular(storage, directory,
|
if (!directory_child_is_regular(storage, directory,
|
||||||
song.filename)) {
|
song.filename)) {
|
||||||
editor.LockDeleteSong(directory, &song);
|
editor.LockDeleteSong(directory, &song);
|
||||||
|
|
||||||
modified = true;
|
modified = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
for (auto i = directory.playlists.begin(),
|
for (auto i = directory.playlists.begin(),
|
||||||
end = directory.playlists.end();
|
end = directory.playlists.end();
|
||||||
|
Loading…
Reference in New Issue
Block a user