mirror of https://github.com/ARMmbed/mbed-os.git
In the open call, the LFS_O_TRUNC flag was correctly zeroing the file, but it wasn't actually writing the change out to disk. This went unnoticed because in the cases where the truncate was followed by a file write, the updated contents would be written out correctly. Marking the file as dirty if the file isn't already truncated fixes the problem with the least impact. Also added better test cases around truncating files. |
||
---|---|---|
.. | ||
bd | ||
fat | ||
littlefs | ||
Dir.cpp | ||
Dir.h | ||
File.cpp | ||
File.h | ||
FileSystem.cpp | ||
FileSystem.h | ||
mbed_filesystem.h | ||
mbed_lib.json |