Skip to content

Commit

Permalink
Merge pull request letscontrolit#5058 from TD-er/bugfix/ESP32_LittleF…
Browse files Browse the repository at this point in the history
…S_crash

[ESP-IDF5.1] Fix crashes on LittleFS after factory reset
  • Loading branch information
TD-er committed May 21, 2024
2 parents c14fffe + 94af2bc commit 54d82ac
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/src/Helpers/ESPEasy_Storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,19 +519,18 @@ void fileSystemCheck()
}

bool FS_format() {
// 'Fix' for IDF 4.4 LittleFS not needed anymore
// #ifdef USE_LITTLEFS
// #ifdef ESP32
// const bool res = ESPEASY_FS.begin(true);
// ESPEASY_FS.end();
// return res;
// #else
// return ESPEASY_FS.format();
// #endif
// #else
#ifdef USE_LITTLEFS
# ifdef ESP32
const bool res = ESPEASY_FS.begin(true);
ESPEASY_FS.end();
return res;
# else // ifdef ESP32
return ESPEASY_FS.format();
# endif // ifdef ESP32
#else // ifdef USE_LITTLEFS
return ESPEASY_FS.format();

// #endif
#endif // ifdef USE_LITTLEFS
}

#ifdef ESP32
Expand Down

0 comments on commit 54d82ac

Please sign in to comment.