diff --git a/deps/oxlib/src/fs/src/filesystem/passthroughfs.cpp b/deps/oxlib/src/fs/src/filesystem/passthroughfs.cpp index 22489c5b..63068a7c 100644 --- a/deps/oxlib/src/fs/src/filesystem/passthroughfs.cpp +++ b/deps/oxlib/src/fs/src/filesystem/passthroughfs.cpp @@ -28,8 +28,10 @@ String PassThroughFS::basePath() const noexcept { } Error PassThroughFS::mkdir(StringViewCR path, bool recursive) noexcept { + auto const cleanPath = + endsWith(path, '/') ? substr(path, 0, path.size() - 1) : path; bool success = false; - const auto p = m_path / stripSlash(path); + auto p = cleanPath.size() ? m_path / stripSlash(cleanPath) : m_path; const auto u8p = p.u8string(); oxTrace("ox.fs.PassThroughFS.mkdir", std::bit_cast(u8p.c_str())); if (recursive) {