diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/cpp/path.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/cpp/path.hpp b/src/utils/cpp/path.hpp index 045ece0e..aa2c8350 100644 --- a/src/utils/cpp/path.hpp +++ b/src/utils/cpp/path.hpp @@ -7,7 +7,10 @@ -> std::filesystem::path { auto n = p.lexically_normal(); if (not n.has_filename()) { - return n.parent_path(); + n = n.parent_path(); + } + if (n.empty()) { + return std::filesystem::path{"."}; } return n; } |