[ox/fs] Fix PassthroughFS mkdir for recursive cases

This commit is contained in:
Gary Talent 2022-07-04 12:34:37 -05:00
parent 6653715795
commit 7d95dbaa99

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);