oyama / pico-vfs

Thin virtual file system for Raspberry Pi Pico
Other
13 stars 4 forks source link

FatFs f_lseek() behaviour different from POSIX #20

Closed oyama closed 5 months ago

oyama commented 5 months ago

As specified in the FatFs documentation, FatFs f_lseek() has a different policy for reporting the file size when moving to an offset above SEEK_END. POSIX reports the actual file size of the write, whereas FatFs reports the size at the seeked position.

As a specific impact, when SQLite is used with FatFs, it reports error code 26 SQLITE_NOTADB when the database is opened.

Reference URL

oyama commented 5 months ago

Changed to f_sync to match FatFs f_write. 4e4ae15