[ox/fs] Fix PassthroughFS mkdir for recursive cases

(synced from 7d95dbaa99)
This commit is contained in:
2022-07-04 12:34:37 -05:00
parent 074a7887d1
commit 627f5a17c6
+1 -2
View File
@@ -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);