From b6afdf12013a0846f7b7bbff659a6f0046862674 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 3 Apr 2024 21:59:16 +0200 Subject: [PATCH] util/UriUtil: disable path segment stripping This bug introduced by commit 49ed9dae34f29f499d193490af2c8a869d170e8e and activated by commit acc1bd6297ed4550f2e567aa2d2d27ffc6784629 caused leading spaces to disappear from the beginning of all file names. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1961 --- src/util/UriUtil.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx index e1d66d845..3ad74cde9 100644 --- a/src/util/UriUtil.cxx +++ b/src/util/UriUtil.cxx @@ -90,7 +90,7 @@ uri_remove_auth(const char *uri) noexcept std::string uri_squash_dot_segments(const char *uri) noexcept { - std::forward_list path = SplitString(std::string_view(uri), '/'); + std::forward_list path = SplitString(std::string_view(uri), '/', false); path.remove_if([](const std::string_view &seg) { return seg == "."; }); path.reverse();