1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-12-23 00:40:49 +00:00

Fixing ESP8266 file format

This commit is contained in:
Lukas Bachschwell 2017-12-25 16:39:54 +01:00
parent 9ec0f20f2a
commit bf8c19c3fc

View File

@ -50,10 +50,16 @@ void ESPUIClass::prepareFileSystem(){
// this function should only be used once
Serial.println('About to prepare filesystem...');
if(!SPIFFS.begin(true)) {
Serial.println("SPIFFS Mount Failed");
return;
}
#if defined(ESP32)
if(!SPIFFS.begin(true)) {
Serial.println("SPIFFS Mount Failed");
return;
}
#else
SPIFFS.begin();
SPIFFS.format();
#endif
deleteFile(SPIFFS, "/index.htm");