-
Notifications
You must be signed in to change notification settings - Fork 13.3k
FILE_WRITE replaces existing content in File on SD-Card in 2.5.1 #6105
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
Comments
The listed example has the sequence which is guaranteed to fail:
After the first close, the writing of the 2nd line will fail since the file is no longer opened. |
That said, upon looking at the code I do see the difference. The attached PR reverts to the old behavior. You can try it yourself in your code by simply adding |
Oh sorry... of course. i was to ambitious cutting out unnecessary parts to provide a short example.
THANK YOU FOR that quick fix! |
Reopening to track the fix commit |
* Make FILE_WRITE append in SD.h wrapper Fixes #6105 * Update host tests
Basic Infos
Platform
Settings in IDE
Problem Description
After updating to 2.5.1, data that gets pushed to an existing file on the SD-Card via
file.println(data); gets no longer added below the last line in the file, but replaces the whole file content. So only the last data, that was pushed to the file, stays there.
I was not able to figure out whether the whole file is replaced or only the content.
Same issue with short and long file name.
Examples to reproduce the Error: SD/Datalogger or SD/ReadWrite
Or the one below.
Output on Serial Monitor at readout should be:
But only is:
Debug Messages
none
The text was updated successfully, but these errors were encountered: