mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* new target: RAK_4631_Repeater
This commit is contained in:
parent
eb685db693
commit
515285e3c9
5 changed files with 143 additions and 9 deletions
|
|
@ -17,7 +17,13 @@ bool IdentityStore::load(const char *name, mesh::LocalIdentity& id) {
|
|||
bool IdentityStore::save(const char *name, const mesh::LocalIdentity& id) {
|
||||
char filename[40];
|
||||
sprintf(filename, "%s/%s.id", _dir, name);
|
||||
|
||||
#if defined(NRF52_PLATFORM)
|
||||
File file = _fs->open(filename, FILE_O_WRITE);
|
||||
if (file) { file.seek(0); file.truncate(); }
|
||||
#else
|
||||
File file = _fs->open(filename, "w", true);
|
||||
#endif
|
||||
if (file) {
|
||||
id.writeTo(file);
|
||||
file.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue