Only update LittleFS timestamp when opened write by earlephilhower · Pull Request #6956 · esp8266/Arduino (original) (raw)
Fixes #6955
LittleFS was updating the timestamp on any close, not only for files
when they were opened for writing. This could lead to excessive writes
to the flash.
Preserve the LFS flags, and only update the timestamp if the file was
opened for writing.