fixes does Factory Reset from the webUI work? #628

This commit is contained in:
proddy
2022-09-20 19:05:02 +05:30
parent c11ea4fe0d
commit 23f65b9eb2

View File

@@ -25,9 +25,10 @@ void FactoryResetService::factoryReset() {
File root = fs->open(FS_CONFIG_DIRECTORY); File root = fs->open(FS_CONFIG_DIRECTORY);
File file; File file;
while (file = root.openNextFile()) { while (file = root.openNextFile()) {
char * pathStr = strdup(file.name()); String path = file.path();
file.close(); file.close();
fs->remove(pathStr); fs->remove(path);
} }
RestartService::restartNow(); RestartService::restartNow();
} }