From 0570f762369e32a3e67b4e15e635a2c902be17cc Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 28 Jan 2025 01:18:44 -0600 Subject: [PATCH] [ox/fs] Fix PassThroughFS::stripSlash --- deps/ox/src/ox/fs/filesystem/passthroughfs.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index 4cc7aa90..365d5bb7 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -185,8 +185,7 @@ Error PassThroughFS::writeFileInode(uint64_t, const void*, uint64_t, FileType) n } std::string_view PassThroughFS::stripSlash(StringView path) noexcept { - const auto pathLen = ox::strlen(path); - for (auto i = 0u; i < pathLen && path[0] == '/'; i++) { + for (auto i = 0u; i < path.len() && path[0] == '/'; i++) { path = substr(path, 1); } return {path.data(), path.bytes()};