summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-17 17:01:02 +0200
committerMax Kellermann <max@musicpd.org>2018-07-17 18:33:32 +0200
commit99d5b616981107f0cb32f9bcc9e29ff92855c78a (patch)
tree5fbc013510b82fc932d4045ede572774a04edd84 /src/storage
parent79e89eb23b554248e4b86631109ae551df6c8d48 (diff)
fs/Path: add operator/(Path,Path)
Modeled after std::filesystem::operator/() from C++17.
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/plugins/LocalStorage.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/storage/plugins/LocalStorage.cxx b/src/storage/plugins/LocalStorage.cxx
index 83b877648..78e5df2e4 100644
--- a/src/storage/plugins/LocalStorage.cxx
+++ b/src/storage/plugins/LocalStorage.cxx
@@ -114,8 +114,7 @@ LocalStorage::MapFSOrThrow(const char *uri_utf8) const
if (StringIsEmpty(uri_utf8))
return base_fs;
- return AllocatedPath::Build(base_fs,
- AllocatedPath::FromUTF8Throw(uri_utf8));
+ return base_fs / AllocatedPath::FromUTF8Throw(uri_utf8);
}
AllocatedPath
@@ -176,7 +175,7 @@ LocalDirectoryReader::Read() noexcept
StorageFileInfo
LocalDirectoryReader::GetInfo(bool follow)
{
- return Stat(AllocatedPath::Build(base_fs, reader.GetEntry()), follow);
+ return Stat(base_fs / reader.GetEntry(), follow);
}
std::unique_ptr<Storage>