diff --git a/src/ox/fs/filesystem/passthroughfs.cpp b/src/ox/fs/filesystem/passthroughfs.cpp index d95ea4215..9d6b8c8eb 100644 --- a/src/ox/fs/filesystem/passthroughfs.cpp +++ b/src/ox/fs/filesystem/passthroughfs.cpp @@ -35,8 +35,7 @@ Error PassThroughFS::mkdir(const char *path, bool recursive) noexcept { if (recursive) { std::error_code ec; const auto isDir = std::filesystem::is_directory(p, ec); - oxReturnError(OxError(ec.value(), "PassThroughFS: mkdir failed")); - if (isDir) { + if (isDir && !ec.value()) { success = true; } else { success = std::filesystem::create_directories(p, ec);