From 2c955a152cb31e7eddb28f1c2401776e70db1f0a Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Fri, 20 Jun 2025 07:52:58 +0200 Subject: [PATCH] Use filesystem operations in path utilities --- modules/core/util/src/util.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core/util/src/util.cpp b/modules/core/util/src/util.cpp index e1eb3f3d3..ea76a08be 100644 --- a/modules/core/util/src/util.cpp +++ b/modules/core/util/src/util.cpp @@ -9,14 +9,15 @@ namespace { std::string GetAbsolutePath(const std::string& relative_path) { - const std::filesystem::path path = std::string(PPC_PATH_TO_PROJECT) + "/tasks/" + relative_path; + std::filesystem::path path = std::filesystem::path(PPC_PATH_TO_PROJECT) / "tasks" / relative_path; return path.string(); } } // namespace std::string ppc::util::GetAbsoluteTaskPath(const std::string& id_path, const std::string& relative_path) { - return GetAbsolutePath(id_path + "/data/" + relative_path); + std::filesystem::path task_relative = std::filesystem::path(id_path) / "data" / relative_path; + return GetAbsolutePath(task_relative.string()); } int ppc::util::GetNumThreads() {