diff --git a/support/include/utils/path.hpp b/support/include/utils/path.hpp index 8c64e704..ad8f57d6 100644 --- a/support/include/utils/path.hpp +++ b/support/include/utils/path.hpp @@ -225,10 +225,7 @@ template string_t path, const std::vector> &paths) -> string_t { - format_path(path, get_directory_seperator(), - get_not_directory_seperator()); - - return absolute(std::accumulate( + path = std::accumulate( paths.begin(), paths.end(), path, [](auto next_path, auto &&path_part) { if (next_path.empty()) { return string_t{path_part}; @@ -238,7 +235,9 @@ template string_t{ get_directory_seperator()} + string_t{path_part}; - })); + }); + + return absolute(path); } inline auto combine(std::string path, diff --git a/support/src/utils/path.cpp b/support/src/utils/path.cpp index f5d56787..cf88dea2 100644 --- a/support/src/utils/path.cpp +++ b/support/src/utils/path.cpp @@ -94,7 +94,8 @@ auto absolute(std::string_view path) -> std::string { } #endif // defined(_WIN32) - return abs_path; + return format_path(abs_path, get_directory_seperator(), + get_not_directory_seperator()); } auto absolute(std::wstring_view path) -> std::wstring {