mirror of
https://github.com/pelgraine/Meck.git
synced 2026-05-06 13:32:43 +02:00
* workaround for nRF + LittleFS glitch with seek/truncate
This commit is contained in:
@@ -47,8 +47,8 @@ bool IdentityStore::save(const char *name, const mesh::LocalIdentity& id) {
|
||||
sprintf(filename, "%s/%s.id", _dir, name);
|
||||
|
||||
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
|
||||
_fs->remove(filename);
|
||||
File file = _fs->open(filename, FILE_O_WRITE);
|
||||
if (file) { file.seek(0); file.truncate(); }
|
||||
#elif defined(RP2040_PLATFORM)
|
||||
File file = _fs->open(filename, "w");
|
||||
#else
|
||||
@@ -69,8 +69,8 @@ bool IdentityStore::save(const char *name, const mesh::LocalIdentity& id, const
|
||||
sprintf(filename, "%s/%s.id", _dir, name);
|
||||
|
||||
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
|
||||
_fs->remove(filename);
|
||||
File file = _fs->open(filename, FILE_O_WRITE);
|
||||
if (file) { file.seek(0); file.truncate(); }
|
||||
#elif defined(RP2040_PLATFORM)
|
||||
File file = _fs->open(filename, "w");
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user