VERY experimental Nintendo Switch 2 emulator
C++
[filesystem] Return ResultPathAlreadyExists from CreateDirectory if path exists (#4224)
crueter479df9809a72
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cppindex f873ebe53e..d5984f560b 100644--- a/src/core/hle/service/filesystem/filesystem.cpp+++ b/src/core/hle/service/filesystem/filesystem.cpp@@ -108,7 +108,9 @@ Result VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) const {Result VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) const {std::string path(Common::FS::SanitizePath(path_));-+ if (GetDirectoryRelativeWrapped(backing, path) != nullptr) {+ return FileSys::ResultPathAlreadyExists;+ }// NOTE: This is inaccurate behavior. CreateDirectory is not recursive.// CreateDirectory should return PathNotFound if the parent directory does not exist.// This is here temporarily in order to have UMM "work" in the meantime.