Merge branch 'v0.20.x'

This commit is contained in:
Max Kellermann
2017-12-03 16:22:08 +01:00
12 changed files with 47 additions and 15 deletions

View File

@@ -106,7 +106,7 @@ Directory::PruneEmpty() noexcept
child != end;) {
child->PruneEmpty();
if (child->IsEmpty())
if (child->IsEmpty() && !child->IsMount())
child = children.erase_and_dispose(child,
DeleteDisposer());
else

View File

@@ -130,7 +130,6 @@ public:
*
* @param name_utf8 the UTF-8 encoded name of the new sub directory
*/
gcc_malloc
Directory *CreateChild(const char *name_utf8);
/**

View File

@@ -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);