mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 05:06:44 +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];
|
||||
|
||||
if(!SPIFFS.begin()) {
|
||||
sprintf_P(msg, PSTR("HASP: \%sFS not mounted. Failed to load %s"), pages.c_str());
|
||||
errorPrintln(msg);
|
||||
errorPrintln(String(F("HASP: %sFS not mounted. Failed to load ")) + pages.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if(!SPIFFS.exists(pages)) {
|
||||
sprintf_P(msg, PSTR("HASP: \%sFile '%s' does not exist"), pages.c_str());
|
||||
errorPrintln(msg);
|
||||
errorPrintln(String(F("HASP: %sNon existing file ")) + pages.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ void setup()
|
||||
/* Init Storage */
|
||||
eepromSetup();
|
||||
#if LV_USE_HASP_SPIFFS
|
||||
// spiffsSetup();
|
||||
spiffsSetup();
|
||||
#endif
|
||||
|
||||
/* Read Config File */
|
||||
|
Loading…
x
Reference in New Issue
Block a user