aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/filesystem/filesystem.cpp
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2026-07-25 01:48:49 +0200
committercrueter <crueter@eden-emu.dev>2026-07-25 01:48:49 +0200
commit479df9809a72bd9cba94bbdb05466a44305497e5 (patch)
treefce8259a1a0e7d3dd04e52ff2ea84eea1e0b2e23 /src/core/hle/service/filesystem/filesystem.cpp
parent5b4c29b12393f9da26a55408ea179d4813ca2c45 (diff)
[filesystem] Return ResultPathAlreadyExists from CreateDirectory if path exists (#4224)
Returning success when the path already exists confuses games like Eastward which use this result in their save logic. Closes https://github.com/eden-emulator/mirror/pull/10 Signed-off-by: crueter <crueter@eden-emu.dev> Co-authored-by: Tom Pratt <tom.pratt@outlook.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4224 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/core/hle/service/filesystem/filesystem.cpp')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 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.