diff --git a/deps/ox/src/ox/fs/filesystem.hpp b/deps/ox/src/ox/fs/filesystem.hpp index 0854456e..dcaf41a4 100644 --- a/deps/ox/src/ox/fs/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem.hpp @@ -368,8 +368,12 @@ int FileSystemTemplate::stripDirectories() { template int FileSystemTemplate::mkdir(const char *path) { - Directory dir; - return write(path, &dir, sizeof(dir), FileType::FileType_Directory); + if (!stat(path).inode) { + Directory dir; + return write(path, &dir, sizeof(dir), FileType::FileType_Directory); + } else { + return 1; + } } template