Closed lrodorigo closed 4 months ago
Update: sorry for opening this. I noticed that is the standard linux behaviour and the "w" mode actually open with TRUNCATE flag. So everything is working properly.
Please close/delete this issue.
Sorry Many thanks
Hi, I am trying to use LittleFS (v 2.8.0) on MX25LM51245G Octo-SPI flash, with STM32U5 microcontroller. Everything seems to properly work, except for this strange behaviour.
When an existing file is opened, written and closed multiple times, it seems that the file is not truncated to the "latest" new size, and it is actually possible to read the previous content.
I also tried to perform a SEEK 0 just after opening the file, but nothing changes. The issue seems to be not present if file is opened with the
LFS_O_TRUNC
flag.follows my current
lfs_config
struct: