Commit 63fc9859 authored by FlashSystems's avatar FlashSystems Committed by Max Kellermann

Fix for "Mount-Points are purged from database on update/rescan."

parent 53def9a6
ver 0.20.13 (not yet released) ver 0.20.13 (not yet released)
* database
- simple: don't purge mount points on update/rescan
ver 0.20.12 (2017/11/25) ver 0.20.12 (2017/11/25)
* database * database
......
...@@ -109,7 +109,7 @@ Directory::PruneEmpty() noexcept ...@@ -109,7 +109,7 @@ Directory::PruneEmpty() noexcept
child != end;) { child != end;) {
child->PruneEmpty(); child->PruneEmpty();
if (child->IsEmpty()) if (child->IsEmpty() && !child->IsMount())
child = children.erase_and_dispose(child, child = children.erase_and_dispose(child,
DeleteDisposer()); DeleteDisposer());
else else
......
...@@ -104,7 +104,7 @@ inline void ...@@ -104,7 +104,7 @@ inline void
UpdateWalk::PurgeDeletedFromDirectory(Directory &directory) UpdateWalk::PurgeDeletedFromDirectory(Directory &directory)
{ {
directory.ForEachChildSafe([&](Directory &child){ directory.ForEachChildSafe([&](Directory &child){
if (DirectoryExists(storage, child)) if (child.IsMount() || DirectoryExists(storage, child))
return; return;
editor.LockDeleteDirectory(&child); editor.LockDeleteDirectory(&child);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment