to not overwrite it, only gather separate update entries when normal folder is done

This commit is contained in:
ElBread3 2024-11-29 12:21:01 -06:00
parent 7a275e9d5f
commit bf1d40c79a

View File

@ -732,32 +732,18 @@ static int HandleSeparateUpdateDents(int fd, char* buf, int nbytes, s64* basep)
int PS4_SYSV_ABI sceKernelGetdents(int fd, char* buf, int nbytes) {
int a = GetDents(fd, buf, nbytes, nullptr);
int b = HandleSeparateUpdateDents(fd, buf, nbytes, nullptr);
if (a == ORBIS_OK && b == ORBIS_OK) {
return ORBIS_OK;
if (a == ORBIS_OK) {
return HandleSeparateUpdateDents(fd, buf, nbytes, nullptr);
}
if (a < 0) {
return a;
}
if (b < 0) {
return b;
}
return a + b;
return a;
}
int PS4_SYSV_ABI sceKernelGetdirentries(int fd, char* buf, int nbytes, s64* basep) {
int a = GetDents(fd, buf, nbytes, basep);
int b = HandleSeparateUpdateDents(fd, buf, nbytes, basep);
if (a == ORBIS_OK && b == ORBIS_OK) {
return ORBIS_OK;
if (a == ORBIS_OK) {
return HandleSeparateUpdateDents(fd, buf, nbytes, basep);
}
if (a < 0) {
return a;
}
if (b < 0) {
return b;
}
return a + b;
return a;
}
s64 PS4_SYSV_ABI sceKernelPwrite(int d, void* buf, size_t nbytes, s64 offset) {