Use different error for /luma folder creation failure

This commit is contained in:
TuxSH 2023-07-20 19:11:24 +02:00
parent a03988b05d
commit 11be450894
2 changed files with 9 additions and 2 deletions

View File

@ -52,7 +52,14 @@ static bool switchToMainDir(bool isSd)
case FR_OK: case FR_OK:
return true; return true;
case FR_NO_PATH: case FR_NO_PATH:
return f_mkdir(mainDir) == FR_OK && switchToMainDir(isSd); {
if (f_mkdir(mainDir) != FR_OK)
{
error("Failed to create luma directory.");
return false;
}
return switchToMainDir(isSd);
}
default: default:
return false; return false;
} }

View File

@ -113,7 +113,7 @@ u32 waitInput(bool isMenu)
return key; return key;
} }
void mcuPowerOff(void) __attribute__((noreturn)) void mcuPowerOff(void)
{ {
// Unmount partitions // Unmount partitions
unmountPartitions(); unmountPartitions();