diff options
author | FlashSystems <developer@flashsystems.de> | 2017-11-25 12:24:27 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-11-27 22:34:49 +0100 |
commit | 63fc98591d9be2ee4f1ef11965f7eb0717689d68 (patch) | |
tree | 3dbbb2b6236d16941abd08d138728d1268ec0513 /src | |
parent | 53def9a6824fdf6f4aea969fd3b28eff563dceec (diff) |
Fix for "Mount-Points are purged from database on update/rescan."
Signed-off-by: FlashSystems <developer@flashsystems.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/db/plugins/simple/Directory.cxx | 2 | ||||
-rw-r--r-- | src/db/update/Walk.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
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); |