Skip to content

Commit ca3301c

Browse files
committed
fix fallback
1 parent 902b663 commit ca3301c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/loadfile.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ static int MCP_LoadCustomFile(void *buffer_out, int buffer_len, int pos)
1717
{
1818
int fsaFd = FSA_Open();
1919
FSA_Mount(fsaFd, "/dev/sdcard01", "/vol/storage_homebrew", 2, NULL, 0);
20-
iosClose(fsaFd);
2120

2221
int bytesRead = 0;
2322
int result = MCP_DoLoadFile("/vol/storage_homebrew/wiiu/root.rpx", NULL, buffer_out, buffer_len, pos, &bytesRead, 0);
23+
24+
FSA_Unmount(fsaFd, "/vol/storage_iosu_homebrew", 0x80000002);
25+
iosClose(fsaFd);
26+
2427
if (result >= 0) {
2528
if (!bytesRead) {
2629
return 0;
@@ -64,7 +67,7 @@ int __attribute__((used)) _MCP_LoadFile_patch(ipcmessage *msg)
6467
replaced = 1;
6568
undo_patches();
6669
int result = MCP_LoadCustomFile(msg->ioctl.buffer_io, msg->ioctl.length_io, request->pos);
67-
if(result)
70+
if(result > 0)
6871
return result;
6972
}
7073

0 commit comments

Comments
 (0)