mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-14 04:24:31 +00:00
[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>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user