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

This commit is contained in:
Max Kellermann 2014-02-12 23:48:04 +01:00
parent ace4ba3171
commit e3e2ad4ae5

View File

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