Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent NRF52 files appending #5856

Closed
wants to merge 1 commit into from

Conversation

todd-herbert
Copy link
Contributor

Possible fix for #5854

Prevents contents appending
@todd-herbert
Copy link
Contributor Author

Possible issues with this one after clearing nodedb. Proceed with caution.

@todd-herbert todd-herbert deleted the seek-start branch January 14, 2025 15:04
@esev
Copy link
Contributor

esev commented Jan 14, 2025

Just curious, what were the issues? I've been looking at the code in https://github.com/geeksville/Adafruit_nRF52_Arduino/blob/master/libraries/Bluefruit52Lib/src/utility/bonding.cpp and this seems to be one way they handle it.

@esev
Copy link
Contributor

esev commented Jan 14, 2025

Never mind. If the data size is smaller this wouldn't truncate the file. I see the issue.

@esev
Copy link
Contributor

esev commented Jan 14, 2025

If you first seek(0), and then truncate(), does that solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants