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)
* database
- simple: don't purge mount points on update/rescan
ver 0.20.12 (2017/11/25)
* database
......
......@@ -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
......
......@@ -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);
......
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