Fix for "Mount-Points are purged from database on update/rescan."
Signed-off-by: FlashSystems <developer@flashsystems.de>
This commit is contained in:
parent
53def9a682
commit
63fc98591d
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
||||||
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
|
||||||
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
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue