mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 21:26:43 +00:00
Fix crash on empty spiffs partition
This commit is contained in:
parent
b81345a77e
commit
c131ae4a65
@ -1299,14 +1299,12 @@ void haspLoadPage(String pages)
|
|||||||
char msg[92];
|
char msg[92];
|
||||||
|
|
||||||
if(!SPIFFS.begin()) {
|
if(!SPIFFS.begin()) {
|
||||||
sprintf_P(msg, PSTR("HASP: \%sFS not mounted. Failed to load %s"), pages.c_str());
|
errorPrintln(String(F("HASP: %sFS not mounted. Failed to load ")) + pages.c_str());
|
||||||
errorPrintln(msg);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!SPIFFS.exists(pages)) {
|
if(!SPIFFS.exists(pages)) {
|
||||||
sprintf_P(msg, PSTR("HASP: \%sFile '%s' does not exist"), pages.c_str());
|
errorPrintln(String(F("HASP: %sNon existing file ")) + pages.c_str());
|
||||||
errorPrintln(msg);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ void setup()
|
|||||||
/* Init Storage */
|
/* Init Storage */
|
||||||
eepromSetup();
|
eepromSetup();
|
||||||
#if LV_USE_HASP_SPIFFS
|
#if LV_USE_HASP_SPIFFS
|
||||||
// spiffsSetup();
|
spiffsSetup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Read Config File */
|
/* Read Config File */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user