diff --git a/NEWS b/NEWS index 266c11e38..d82e2b19d 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.20.13 (not yet released) +* database + - simple: don't purge mount points on update/rescan ver 0.20.12 (2017/11/25) * database diff --git a/src/db/plugins/simple/Directory.cxx b/src/db/plugins/simple/Directory.cxx index 655778b99..30b044b1f 100644 --- a/src/db/plugins/simple/Directory.cxx +++ b/src/db/plugins/simple/Directory.cxx @@ -109,7 +109,7 @@ Directory::PruneEmpty() noexcept child != end;) { child->PruneEmpty(); - if (child->IsEmpty()) + if (child->IsEmpty() && !child->IsMount()) child = children.erase_and_dispose(child, DeleteDisposer()); else diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx index c3af3f789..1ef37e4d1 100644 --- a/src/db/update/Walk.cxx +++ b/src/db/update/Walk.cxx @@ -104,7 +104,7 @@ inline void UpdateWalk::PurgeDeletedFromDirectory(Directory &directory) { directory.ForEachChildSafe([&](Directory &child){ - if (DirectoryExists(storage, child)) + if (child.IsMount() || DirectoryExists(storage, child)) return; editor.LockDeleteDirectory(&child);