mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-31 22:44:41 +00:00
Earlier ro check in posix_rmdir
Hardware tests suggest these checks are in a different order
This commit is contained in:
parent
5f3da89091
commit
384e036533
@ -500,13 +500,13 @@ s32 PS4_SYSV_ABI posix_rmdir(const char* path) {
|
|||||||
|
|
||||||
const std::filesystem::path dir_name = mnt->GetHostPath(path, &ro);
|
const std::filesystem::path dir_name = mnt->GetHostPath(path, &ro);
|
||||||
|
|
||||||
if (dir_name.empty() || !std::filesystem::is_directory(dir_name)) {
|
if (ro) {
|
||||||
*__Error() = POSIX_ENOTDIR;
|
*__Error() = POSIX_EROFS;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ro) {
|
if (dir_name.empty() || !std::filesystem::is_directory(dir_name)) {
|
||||||
*__Error() = POSIX_EROFS;
|
*__Error() = POSIX_ENOTDIR;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user