aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-12 23:48:04 +0100
committerMax Kellermann <max@duempel.org>2014-02-12 23:48:08 +0100
commite3e2ad4ae54e91f69f24c5e66cb67e5a9ba5a8d9 (patch)
tree197efd3c2b479d1146e0b7f6850dcf3e763f5240
parentace4ba317105341364313d2d1e78b54829ae3883 (diff)
downloadmpd-e3e2ad4ae54e91f69f24c5e66cb67e5a9ba5a8d9.tar.gz
mpd-e3e2ad4ae54e91f69f24c5e66cb67e5a9ba5a8d9.tar.xz
mpd-e3e2ad4ae54e91f69f24c5e66cb67e5a9ba5a8d9.zip
CompositeStorage: fix tree walk in Directory::Unmount()
-rw-r--r--src/storage/CompositeStorage.cxx5
1 files changed, 4 insertions, 1 deletions
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())