* workaround for nRF + LittleFS glitch with seek/truncate

This commit is contained in:
Scott Powell committed 2025-05-20 16:29:09 +10:00
1 parent 9df9b1cc7d
commit 9ea6f91c09
4 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -74,8 +74,8 @@ void CommonCLI::loadPrefsInt(FILESYSTEM* fs, const char* filename) {
void CommonCLI::savePrefs(FILESYSTEM* fs) {
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
fs->remove("/com_prefs");
File file = fs->open("/com_prefs", FILE_O_WRITE);
if (file) { file.seek(0); file.truncate(); }
#elif defined(RP2040_PLATFORM)
File file = fs->open("/com_prefs", "w");
#else