Skip to content

Commit

Permalink
to not overwrite it, only gather separate update entries when normal …
Browse files Browse the repository at this point in the history
…folder is done
  • Loading branch information
ElBread3 committed Nov 29, 2024
1 parent 6e32ec7 commit 3fd7351
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions src/core/libraries/kernel/file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,32 +600,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 < 0) {
return a;
}
if (b < 0) {
return b;
if (a == ORBIS_OK) {
return HandleSeparateUpdateDents(fd, buf, nbytes, nullptr);
}
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 < 0) {
return a;
}
if (b < 0) {
return b;
if (a == ORBIS_OK) {
return HandleSeparateUpdateDents(fd, buf, nbytes, basep);
}
return a + b;
return a;
}

s64 PS4_SYSV_ABI sceKernelPwrite(int d, void* buf, size_t nbytes, s64 offset) {
Expand Down

0 comments on commit 3fd7351

Please sign in to comment.