We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d1eab0 commit a1a0f3cCopy full SHA for a1a0f3c
src/normalize.cpp
@@ -90,9 +90,6 @@ fs_drop_trailing_slash(std::string_view path)
90
// drop trailing "/" and "\" from the path
91
// but not if it is the root name
92
93
- if (path.empty())
94
- return {};
95
-
96
std::string p(path);
97
98
while(p.length() > 1 && (p.back() == '/' || (fs_is_windows() && p.back() == '\\')))
src/parent.cpp
@@ -53,7 +53,7 @@ std::string fs_parent(std::string_view path)
53
return ".";
54
55
// need this for <filesystem> or _splitpath_s to make x: x:/
56
- if (fs_is_windows() && !p.empty() && p == fs_root_name(p))
+ if (fs_is_windows() && p == fs_root_name(p))
57
p.push_back('/');
58
59
return p;
0 commit comments