Merge branch 'struc' of git://github.com/neheb/MPD

This commit is contained in:
Max Kellermann
2021-03-04 17:50:53 +01:00
15 changed files with 49 additions and 61 deletions

View File

@@ -138,13 +138,10 @@ Directory::LookupDirectory(std::string_view _uri) noexcept
Directory *d = this;
do {
auto s = uri.Split(PathTraitsUTF8::SEPARATOR);
if (s.first.empty())
auto [name, rest] = uri.Split(PathTraitsUTF8::SEPARATOR);
if (name.empty())
break;
const auto name = s.first;
const auto rest = s.second;
Directory *tmp = d->FindChild(name);
if (tmp == nullptr)
/* not found */