fs/Path: add operator/(Path,Path)

Modeled after std::filesystem::operator/() from C++17.
This commit is contained in:
Max Kellermann
2018-07-17 17:01:02 +02:00
parent 79e89eb23b
commit 99d5b61698
14 changed files with 40 additions and 32 deletions

View File

@@ -53,8 +53,7 @@ CreateConfiguredDatabase(EventLoop &main_event_loop, EventLoop &io_event_loop,
if (cache_dir.IsNull())
return nullptr;
const auto db_file = AllocatedPath::Build(cache_dir,
PATH_LITERAL("mpd.db"));
const auto db_file = cache_dir / Path::FromFS(PATH_LITERAL("mpd.db"));
const auto db_file_utf8 = db_file.ToUTF8();
if (db_file_utf8.empty())
return nullptr;