mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-20 18:59:26 +02: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:
parent
5b4c29b123
commit
479df9809a
1 changed files with 3 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue