Merge branch 'struc' of git://github.com/neheb/MPD
This commit is contained in:
@@ -427,21 +427,19 @@ UpdateWalk::DirectoryMakeUriParentChecked(Directory &root,
|
||||
StringView uri(_uri);
|
||||
|
||||
while (true) {
|
||||
auto s = uri.Split('/');
|
||||
const std::string_view name = s.first;
|
||||
const auto rest = s.second;
|
||||
auto [name, rest] = uri.Split('/');
|
||||
if (rest == nullptr)
|
||||
break;
|
||||
|
||||
if (!name.empty()) {
|
||||
directory = DirectoryMakeChildChecked(*directory,
|
||||
std::string(name).c_str(),
|
||||
s.first);
|
||||
name);
|
||||
if (directory == nullptr)
|
||||
break;
|
||||
}
|
||||
|
||||
uri = s.second;
|
||||
uri = rest;
|
||||
}
|
||||
|
||||
return directory;
|
||||
|
||||
Reference in New Issue
Block a user