Replace FSCom.format() with FSCom.rmDir() for directory cleanup in NodeDB::loadFromDisk()

This commit is contained in:
Ben Meadors
2026-04-29 16:41:21 -05:00
parent 7be5426f34
commit 089af764ec

View File

@@ -1209,7 +1209,7 @@ void NodeDB::loadFromDisk()
spiLock->lock();
if (!FSCom.exists("/prefs/" xstr(BUILD_EPOCH))) {
LOG_WARN("Factory Install Reset!");
FSCom.format();
FSCom.rmDir("/prefs");
FSCom.mkdir("/prefs");
File f2 = FSCom.open("/prefs/" xstr(BUILD_EPOCH), FILE_O_WRITE);
if (f2) {