Skip to content

Commit

Permalink
added stat
Browse files Browse the repository at this point in the history
  • Loading branch information
dots-tb committed Mar 14, 2018
1 parent 35a0ae2 commit aaaff6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions repatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ static int _sceIoGetstat_patched(const char *file, SceIoStat *stat, int r2) {
static int ksceIoOpen_patched(const char *filename, int flag, SceIoMode mode) {
int ret = -1, state;
char new_path[MAX_PATH_LEN];
SceIoStat k_stat;
ENTER_SYSCALL(state);
if(strstr(filename, "/eboot.bin") != NULL) {
if(getNewPath(filename, new_path, NULL))
ret = TAI_CONTINUE(int, ref_hooks[2], new_path, flag, mode);
if(getNewPath(filename, new_path, NULL)) {
if(ksceIoGetstat(new_path, &k_stat)>-1)
ret = TAI_CONTINUE(int, ref_hooks[2], new_path, flag, mode);
}
}
if(ret <= 0) ret = TAI_CONTINUE(int, ref_hooks[2], filename, flag, mode);
EXIT_SYSCALL(state);
Expand Down

0 comments on commit aaaff6e

Please sign in to comment.