CompositeStorage: fix tree walk in Directory::Unmount()
This commit is contained in:
parent
ace4ba3171
commit
e3e2ad4ae5
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user