From da9caa1cedd69702aea44cb44b2fd0a2d6d56916 Mon Sep 17 00:00:00 2001 From: Kiminuo Date: Wed, 13 Jan 2021 15:44:40 +0100 Subject: Replace fs::absolute calls with AbsPathJoin calls This adds better test coverage and will make it easier in #20744 to remove our dependency on the two-argument boost::filesystem::absolute() function which does not have a direct equivalent in C++17. --- src/fs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/fs.cpp') diff --git a/src/fs.cpp b/src/fs.cpp index 7eb0f5ca9f..4f20ca4d28 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -31,6 +31,12 @@ FILE *fopen(const fs::path& p, const char *mode) #endif } +fs::path AbsPathJoin(const fs::path& base, const fs::path& path) +{ + assert(base.is_absolute()); + return fs::absolute(path, base); +} + #ifndef WIN32 static std::string GetErrorReason() -- cgit v1.2.3