summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/commit_git_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/root_maps/commit_git_map.cpp')
-rw-r--r--src/other_tools/root_maps/commit_git_map.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp
index a64ccc49..e5910b9b 100644
--- a/src/other_tools/root_maps/commit_git_map.cpp
+++ b/src/other_tools/root_maps/commit_git_map.cpp
@@ -29,6 +29,7 @@
#include "src/other_tools/just_mr/progress_reporting/statistics.hpp"
#include "src/other_tools/root_maps/root_utils.hpp"
#include "src/other_tools/utils/curl_url_handle.hpp"
+#include "src/utils/cpp/path.hpp"
namespace {
@@ -38,14 +39,11 @@ namespace {
static auto const kRelPath = std::string{"./"};
static auto const kFileScheme = std::string{"file://"};
- if (url.starts_with(kAbsPath)) {
- return url;
- }
- if (url.starts_with(kRelPath)) {
- return url.substr(kRelPath.length());
+ if (url.starts_with(kAbsPath) or url.starts_with(kRelPath)) {
+ return ToNormalPath(url).string();
}
if (url.starts_with(kFileScheme)) {
- return url.substr(kFileScheme.length());
+ return ToNormalPath(url.substr(kFileScheme.length())).string();
}
return std::nullopt;