Skip to content

Commit 2c955a1

Browse files
committed
Use filesystem operations in path utilities
1 parent 81c3284 commit 2c955a1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

modules/core/util/src/util.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
namespace {
1010

1111
std::string GetAbsolutePath(const std::string& relative_path) {
12-
const std::filesystem::path path = std::string(PPC_PATH_TO_PROJECT) + "/tasks/" + relative_path;
12+
std::filesystem::path path = std::filesystem::path(PPC_PATH_TO_PROJECT) / "tasks" / relative_path;
1313
return path.string();
1414
}
1515

1616
} // namespace
1717

1818
std::string ppc::util::GetAbsoluteTaskPath(const std::string& id_path, const std::string& relative_path) {
19-
return GetAbsolutePath(id_path + "/data/" + relative_path);
19+
std::filesystem::path task_relative = std::filesystem::path(id_path) / "data" / relative_path;
20+
return GetAbsolutePath(task_relative.string());
2021
}
2122

2223
int ppc::util::GetNumThreads() {

0 commit comments

Comments
 (0)