Commit e3e2ad4a authored by Max Kellermann's avatar Max Kellermann

CompositeStorage: fix tree walk in Directory::Unmount()

parent ace4ba31
...@@ -162,10 +162,13 @@ CompositeStorage::Directory::Unmount() ...@@ -162,10 +162,13 @@ CompositeStorage::Directory::Unmount()
bool bool
CompositeStorage::Directory::Unmount(const char *uri) CompositeStorage::Directory::Unmount(const char *uri)
{ {
if (*uri == 0)
return Unmount();
const std::string name = NextSegment(uri); const std::string name = NextSegment(uri);
auto i = children.find(name); auto i = children.find(name);
if (i == children.end() || !i->second.Unmount()) if (i == children.end() || !i->second.Unmount(uri))
return false; return false;
if (i->second.IsEmpty()) if (i->second.IsEmpty())
......
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