mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
8d591d5bc7
If a existing file is opened with truncate mode e.g. fopen(file, "w+"), the file size will be incorrect after writing any data to the file. Before writing to the first sector, the reading is performed again. As a result, it makes an invalid file size. When a sector buffer is used, it must also write to the first sector.