Don't close the directory if not already opened
This commit is contained in:
parent
d270d5b9ca
commit
a868079a93
@ -126,9 +126,11 @@ void loadPayload(u32 pressed)
|
||||
|
||||
FRESULT result = f_findfirst(&dir, &info, path, pattern);
|
||||
|
||||
if(result == FR_OK)
|
||||
{
|
||||
f_closedir(&dir);
|
||||
|
||||
if(result == FR_OK && info.fname[0] != 0)
|
||||
if(info.fname[0] != 0)
|
||||
{
|
||||
u32 *loaderAddress = (u32 *)0x24FFFF00;
|
||||
u8 *payloadAddress = (u8 *)0x24F00000;
|
||||
@ -153,6 +155,7 @@ void loadPayload(u32 pressed)
|
||||
((void (*)())loaderAddress)();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 firmRead(void *dest, u32 firmType)
|
||||
|
Reference in New Issue
Block a user