Don't close the directory if not already opened

This commit is contained in:
Aurora 2016-10-10 03:50:24 +02:00
parent d270d5b9ca
commit a868079a93

View File

@ -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;
@ -154,6 +156,7 @@ void loadPayload(u32 pressed)
}
}
}
}
u32 firmRead(void *dest, u32 firmType)
{