summaryrefslogtreecommitdiffhomepage
path: root/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'file.cpp')
-rw-r--r--file.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/file.cpp b/file.cpp
index 9912d29..da00dff 100644
--- a/file.cpp
+++ b/file.cpp
@@ -22,3 +22,10 @@ bool is_compile_unit_source_by_extension(const fs::path& p) {
return compile_unit_source_types.find(ext) != compile_unit_source_types.end();
}
+std::filesystem::path simplified_path(const std::filesystem::path& p)
+{
+ if (p.string().substr(0, 2) == "./") {
+ return p.string().substr(2);
+ }
+ return p;
+}