util/UriUtil: disable path segment stripping

This bug introduced by commit 49ed9dae34
and activated by commit acc1bd6297
caused leading spaces to disappear from the beginning of all file
names.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1961
This commit is contained in:
Max Kellermann 2024-04-03 21:59:16 +02:00
parent 08a00ee21b
commit b6afdf1201
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ uri_remove_auth(const char *uri) noexcept
std::string
uri_squash_dot_segments(const char *uri) noexcept
{
std::forward_list<std::string_view> path = SplitString(std::string_view(uri), '/');
std::forward_list<std::string_view> path = SplitString(std::string_view(uri), '/', false);
path.remove_if([](const std::string_view &seg) { return seg == "."; });
path.reverse();