From e3e2ad4ae54e91f69f24c5e66cb67e5a9ba5a8d9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 12 Feb 2014 23:48:04 +0100 Subject: CompositeStorage: fix tree walk in Directory::Unmount() --- src/storage/CompositeStorage.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/storage/CompositeStorage.cxx b/src/storage/CompositeStorage.cxx index e090bd63c..9a27270df 100644 --- a/src/storage/CompositeStorage.cxx +++ b/src/storage/CompositeStorage.cxx @@ -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()) -- cgit v1.2.3