mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* workaround for nRF + LittleFS glitch with seek/truncate
This commit is contained in:
parent
e5376f0c0a
commit
56b84408e4
4 changed files with 9 additions and 9 deletions
|
|
@ -127,8 +127,8 @@ class MyMesh : public BaseChatMesh, ContactVisitor {
|
|||
|
||||
void saveContacts() {
|
||||
#if defined(NRF52_PLATFORM)
|
||||
_fs->remove("/contacts");
|
||||
File file = _fs->open("/contacts", FILE_O_WRITE);
|
||||
if (file) { file.seek(0); file.truncate(); }
|
||||
#elif defined(RP2040_PLATFORM)
|
||||
File file = _fs->open("/contacts", "w");
|
||||
#else
|
||||
|
|
@ -341,8 +341,8 @@ public:
|
|||
|
||||
void savePrefs() {
|
||||
#if defined(NRF52_PLATFORM)
|
||||
_fs->remove("/node_prefs");
|
||||
File file = _fs->open("/node_prefs", FILE_O_WRITE);
|
||||
if (file) { file.seek(0); file.truncate(); }
|
||||
#elif defined(RP2040_PLATFORM)
|
||||
File file = _fs->open("/node_prefs", "w");
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue