[ox/fs] Fix PassThroughFS::stripSlash
All checks were successful
Build / build (push) Successful in 3m32s
All checks were successful
Build / build (push) Successful in 3m32s
This commit is contained in:
parent
e22b658a67
commit
0570f76236
@ -185,8 +185,7 @@ Error PassThroughFS::writeFileInode(uint64_t, const void*, uint64_t, FileType) n
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string_view PassThroughFS::stripSlash(StringView path) noexcept {
|
std::string_view PassThroughFS::stripSlash(StringView path) noexcept {
|
||||||
const auto pathLen = ox::strlen(path);
|
for (auto i = 0u; i < path.len() && path[0] == '/'; i++) {
|
||||||
for (auto i = 0u; i < pathLen && path[0] == '/'; i++) {
|
|
||||||
path = substr(path, 1);
|
path = substr(path, 1);
|
||||||
}
|
}
|
||||||
return {path.data(), path.bytes()};
|
return {path.data(), path.bytes()};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user