Skip to content

Commit a8a7d9e

Browse files
Use LittleFS for ESP32
1 parent 13b3dd0 commit a8a7d9e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/FactoryResetService.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ void FactoryResetService::handleRequest(AsyncWebServerRequest* request) {
1919
*/
2020
void FactoryResetService::factoryReset() {
2121
#ifdef ESP32
22-
File root = fs->open(FS_CONFIG_DIRECTORY);
23-
File file;
24-
while (file = root.openNextFile()) {
25-
fs->remove(file.name());
26-
}
22+
fs->rmdir(FS_CONFIG_DIRECTORY);
2723
#elif defined(ESP8266)
2824
Dir configDirectory = fs->openDir(FS_CONFIG_DIRECTORY);
2925
while (configDirectory.next()) {

0 commit comments

Comments
 (0)