diff options
| author | Léo Lam <leo@leolam.fr> | 2020-02-02 16:50:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-02 16:50:02 +0100 |
| commit | 06d0b1ad481bb94c09e373c0c92fe03c29f7ffcf (patch) | |
| tree | 6a28760ffc157fc5261789b7e2e29c22c6cf40d6 /Source/Core | |
| parent | 4c9b1f3e0b9afdc7932b4881e88001d241aaa381 (diff) | |
| parent | bbc86313573054e2b600aec8c0e785999003bf4c (diff) | |
Merge pull request #8594 from leoetlino/fs-createfullpath-fix
IOS/FS: Fix CreateFullPath to not create directories that already exist
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/IOS/FS/FileSystem.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/Core/IOS/FS/FileSystem.cpp b/Source/Core/Core/IOS/FS/FileSystem.cpp index 66bd7659ae..512f7ae50b 100644 --- a/Source/Core/Core/IOS/FS/FileSystem.cpp +++ b/Source/Core/Core/IOS/FS/FileSystem.cpp @@ -115,9 +115,12 @@ ResultCode FileSystem::CreateFullPath(Uid uid, Gid gid, const std::string& path, if (metadata && metadata->is_file) return ResultCode::Invalid; - const ResultCode result = CreateDirectory(uid, gid, subpath, attribute, modes); - if (result != ResultCode::Success && result != ResultCode::AlreadyExists) - return result; + if (!metadata) + { + const ResultCode result = CreateDirectory(uid, gid, subpath, attribute, modes); + if (result != ResultCode::Success) + return result; + } ++position; } |
