Skip to content

Commit 1c08166

Browse files
committed
es: don't init isfs if it wasn't init yet
1 parent ef09a9d commit 1c08166

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

libogc/es.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,9 @@ s32 ES_SetUID(u64 uid)
197197

198198
s32 ret = IOS_IoctlvFormat(__es_hid,__es_fd,IOCTL_ES_SETUID,"q:",uid);
199199

200-
//if the call succeeded, our FS handle needs to be reopened, as IOS saves access of our FD
201-
if(ret >= 0)
202-
{
203-
ISFS_Deinitialize();
200+
//if the call succeeded, our FS handle needs to be reopened (if it was opened to begin with), as IOS saves access of our FD
201+
if(ret >= 0 && ISFS_Deinitialize() != ISFS_OK)
204202
ISFS_Initialize();
205-
}
206203

207204
return ret;
208205
}

0 commit comments

Comments
 (0)