Replace FSCom.format() with FSCom.rmDir() for directory cleanup in NodeDB::loadFromDisk()
This commit is contained in:
+1
-1
@@ -1209,7 +1209,7 @@ void NodeDB::loadFromDisk()
|
|||||||
spiLock->lock();
|
spiLock->lock();
|
||||||
if (!FSCom.exists("/prefs/" xstr(BUILD_EPOCH))) {
|
if (!FSCom.exists("/prefs/" xstr(BUILD_EPOCH))) {
|
||||||
LOG_WARN("Factory Install Reset!");
|
LOG_WARN("Factory Install Reset!");
|
||||||
FSCom.format();
|
FSCom.rmDir("/prefs");
|
||||||
FSCom.mkdir("/prefs");
|
FSCom.mkdir("/prefs");
|
||||||
File f2 = FSCom.open("/prefs/" xstr(BUILD_EPOCH), FILE_O_WRITE);
|
File f2 = FSCom.open("/prefs/" xstr(BUILD_EPOCH), FILE_O_WRITE);
|
||||||
if (f2) {
|
if (f2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user