diff --git a/src/db/plugins/simple/Song.cxx b/src/db/plugins/simple/Song.cxx index 702db8bed..3da13b9ea 100644 --- a/src/db/plugins/simple/Song.cxx +++ b/src/db/plugins/simple/Song.cxx @@ -41,7 +41,7 @@ Song::GetURI() const noexcept return filename; else { const char *path = parent.GetPath(); - return PathTraitsUTF8::Build(path, filename.c_str()); + return PathTraitsUTF8::Build(path, filename); } } diff --git a/src/db/plugins/upnp/UpnpDatabasePlugin.cxx b/src/db/plugins/upnp/UpnpDatabasePlugin.cxx index 597c67fa0..571f460f3 100644 --- a/src/db/plugins/upnp/UpnpDatabasePlugin.cxx +++ b/src/db/plugins/upnp/UpnpDatabasePlugin.cxx @@ -397,8 +397,7 @@ UpnpDatabase::BuildPath(const ContentDirectoryService &server, if (path.empty()) path = dirent.name; else - path = PathTraitsUTF8::Build(dirent.name.c_str(), - path.c_str()); + path = PathTraitsUTF8::Build(dirent.name, path); } return PathTraitsUTF8::Build(server.getFriendlyName(), diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx index a1d187933..084bb5c37 100644 --- a/src/db/update/Walk.cxx +++ b/src/db/update/Walk.cxx @@ -322,7 +322,7 @@ UpdateWalk::UpdateDirectory(Directory &directory, try { Mutex mutex; - auto is = InputStream::OpenReady(PathTraitsUTF8::Build(storage.MapUTF8(directory.GetPath()).c_str(), + auto is = InputStream::OpenReady(PathTraitsUTF8::Build(storage.MapUTF8(directory.GetPath()), ".mpdignore").c_str(), mutex); child_exclude_list.Load(std::move(is)); diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index 5cabd379c..edb3b8f6b 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -75,7 +75,7 @@ CurlStorage::MapUTF8(const char *uri_utf8) const noexcept return base; std::string path_esc = CurlEscapeUriPath(uri_utf8); - return PathTraitsUTF8::Build(base.c_str(), path_esc.c_str()); + return PathTraitsUTF8::Build(base, path_esc); } const char * diff --git a/src/storage/plugins/LocalStorage.cxx b/src/storage/plugins/LocalStorage.cxx index a9d5a4f9b..336161043 100644 --- a/src/storage/plugins/LocalStorage.cxx +++ b/src/storage/plugins/LocalStorage.cxx @@ -102,7 +102,7 @@ LocalStorage::MapUTF8(const char *uri_utf8) const noexcept if (StringIsEmpty(uri_utf8)) return base_utf8; - return PathTraitsUTF8::Build(base_utf8.c_str(), uri_utf8); + return PathTraitsUTF8::Build(base_utf8, uri_utf8); } AllocatedPath diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx index f1bdfa139..a116d5591 100644 --- a/src/storage/plugins/NfsStorage.cxx +++ b/src/storage/plugins/NfsStorage.cxx @@ -240,7 +240,7 @@ NfsStorage::MapUTF8(const char *uri_utf8) const noexcept if (StringIsEmpty(uri_utf8)) return base; - return PathTraitsUTF8::Build(base.c_str(), uri_utf8); + return PathTraitsUTF8::Build(base, uri_utf8); } const char * diff --git a/src/storage/plugins/SmbclientStorage.cxx b/src/storage/plugins/SmbclientStorage.cxx index a0c662f54..ad08c9eb3 100644 --- a/src/storage/plugins/SmbclientStorage.cxx +++ b/src/storage/plugins/SmbclientStorage.cxx @@ -81,7 +81,7 @@ SmbclientStorage::MapUTF8(const char *uri_utf8) const noexcept if (StringIsEmpty(uri_utf8)) return base; - return PathTraitsUTF8::Build(base.c_str(), uri_utf8); + return PathTraitsUTF8::Build(base, uri_utf8); } const char * @@ -174,7 +174,7 @@ SmbclientDirectoryReader::Read() noexcept StorageFileInfo SmbclientDirectoryReader::GetInfo([[maybe_unused]] bool follow) { - const std::string path = PathTraitsUTF8::Build(base.c_str(), name); + const std::string path = PathTraitsUTF8::Build(base, name); return ::GetInfo(path.c_str()); } diff --git a/src/storage/plugins/UdisksStorage.cxx b/src/storage/plugins/UdisksStorage.cxx index e74b8f4e4..2c280e0af 100644 --- a/src/storage/plugins/UdisksStorage.cxx +++ b/src/storage/plugins/UdisksStorage.cxx @@ -340,7 +340,7 @@ UdisksStorage::MapUTF8(const char *uri_utf8) const noexcept return mounted_storage->MapUTF8(uri_utf8); } catch (...) { /* fallback - not usable but the best we can do */ - return PathTraitsUTF8::Build(base_uri.c_str(), uri_utf8); + return PathTraitsUTF8::Build(base_uri, uri_utf8); } }