We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13b3dd0 commit a8a7d9eCopy full SHA for a8a7d9e
src/FactoryResetService.cpp
@@ -19,11 +19,7 @@ void FactoryResetService::handleRequest(AsyncWebServerRequest* request) {
19
*/
20
void FactoryResetService::factoryReset() {
21
#ifdef ESP32
22
- File root = fs->open(FS_CONFIG_DIRECTORY);
23
- File file;
24
- while (file = root.openNextFile()) {
25
- fs->remove(file.name());
26
- }
+ fs->rmdir(FS_CONFIG_DIRECTORY);
27
#elif defined(ESP8266)
28
Dir configDirectory = fs->openDir(FS_CONFIG_DIRECTORY);
29
while (configDirectory.next()) {
0 commit comments