1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-22 09:10:54 +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 // this function should only be used once
Serial.println('About to prepare filesystem...'); Serial.println('About to prepare filesystem...');
#if defined(ESP32)
if(!SPIFFS.begin(true)) { if(!SPIFFS.begin(true)) {
Serial.println("SPIFFS Mount Failed"); Serial.println("SPIFFS Mount Failed");
return; return;
} }
#else
SPIFFS.begin();
SPIFFS.format();
#endif
deleteFile(SPIFFS, "/index.htm"); deleteFile(SPIFFS, "/index.htm");