mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-26 10:48:52 +00:00
* new target: RAK_4631_Repeater
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user