From 7d95dbaa9928e799d422227871f8f9bafaedea6f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 4 Jul 2022 12:34:37 -0500 Subject: [PATCH] [ox/fs] Fix PassthroughFS mkdir for recursive cases --- 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 d95ea421..9d6b8c8e 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/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);