* workaround for nRF + LittleFS glitch with seek/truncate

This commit is contained in:
Scott Powell 2025-05-20 16:29:09 +10:00
parent e5376f0c0a
commit 56b84408e4
4 changed files with 9 additions and 9 deletions

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