summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/fetch.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-04-22 11:09:17 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2025-04-22 13:50:57 +0200
commita212d87be891c5146021b6442063ed39a4a1cd4a (patch)
tree9df2902cf7f8bf9d70917ab87865517e9bdc71c3 /src/other_tools/just_mr/fetch.cpp
parentba51f59519847a3d298fd176d93a0b6c64f452c1 (diff)
downloadjustbuild-a212d87be891c5146021b6442063ed39a4a1cd4a.tar.gz
Remove redundant calls to std::filesystem::absolute
...when calling std::filesystem::weakly_canonical, since the latter converts the argument path to an absolute path internally.
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r--src/other_tools/just_mr/fetch.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp
index 0dd3a155..3585d2f3 100644
--- a/src/other_tools/just_mr/fetch.cpp
+++ b/src/other_tools/just_mr/fetch.cpp
@@ -86,8 +86,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
if (not fetch_dir) {
for (auto const& d : common_args.just_mr_paths->distdirs) {
if (FileSystemManager::IsDirectory(d)) {
- fetch_dir = std::filesystem::weakly_canonical(
- std::filesystem::absolute(d));
+ fetch_dir = std::filesystem::weakly_canonical(d);
break;
}
}
@@ -147,9 +146,8 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
std::filesystem::path(repo_path->String());
if (not repo_path_as_path.is_absolute()) {
repo_path_as_path = std::filesystem::weakly_canonical(
- std::filesystem::absolute(
- common_args.just_mr_paths->setup_root /
- repo_path_as_path));
+ common_args.just_mr_paths->setup_root /
+ repo_path_as_path);
}
// only warn if repo workspace differs to invocation workspace
if (not is_subpath(