We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b7e30f commit 12ceeecCopy full SHA for 12ceeec
src/ESPFS.h
@@ -1,7 +1,2 @@
1
-#ifdef ESP32
2
-#include <SPIFFS.h>
3
-#define ESPFS SPIFFS
4
-#elif defined(ESP8266)
5
#include <LittleFS.h>
6
#define ESPFS LittleFS
7
-#endif
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