@@ -63,13 +63,16 @@ void DataStore::begin() {
6363 #include < SPIFFS.h>
6464#elif defined(RP2040_PLATFORM)
6565 #include < LittleFS.h>
66- #elif defined(NRF52_PLATFORM)
67- #include < CustomLFS.h>
66+ #elif defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
6867 #if defined(QSPIFLASH)
6968 #include < CustomLFS_QSPIFlash.h>
69+ #else
70+ #if defined(EXTRAFS)
71+ #include < CustomLFS.h>
72+ #else
73+ #include < InternalFileSystem.h>
7074 #endif
71- #elif defined(STM32_PLATFORM)
72- #include < InternalFileSystem.h>
75+ #endif
7376#endif
7477
7578#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
@@ -471,9 +474,9 @@ void DataStore::migrateToSecondaryFS() {
471474 }
472475 }
473476 if (!_fsExtra->exists (" /channels2" )) {
474- if (_fs->exists (" /contacts2 " )) {
475- File oldFile = openRead (_fs, " /contacts2 " );
476- File newFile = openWrite (_fsExtra, " /contacts2 " );
477+ if (_fs->exists (" /channels2 " )) {
478+ File oldFile = openRead (_fs, " /channels2 " );
479+ File newFile = openWrite (_fsExtra, " /channels2 " );
477480
478481 if (oldFile && newFile) {
479482 uint8_t buf[64 ];
@@ -484,7 +487,7 @@ void DataStore::migrateToSecondaryFS() {
484487 }
485488 if (oldFile) oldFile.close ();
486489 if (newFile) newFile.close ();
487- _fs->remove (" /contacts2 " );
490+ _fs->remove (" /channels2 " );
488491 }
489492 }
490493 // cleanup nodes which have been testing the extra fs, copy _main.id and new_prefs back to primary
@@ -527,6 +530,9 @@ void DataStore::migrateToSecondaryFS() {
527530 if (_fs->exists (" /contacts3" )) {
528531 _fs->remove (" /contacts3" );
529532 }
533+ if (_fs->exists (" /channels2" )) {
534+ _fs->remove (" /channels2" );
535+ }
530536 if (_fsExtra->exists (" /_main.id" )) {
531537 _fsExtra->remove (" /_main.id" );
532538 }
0 commit comments