1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-21 13:38:01 +03:00

On MacOS, when increasing the size of files on FAT filesystems from 0 to

1 byte in order to preserve their inode numbers, be sure to fsync() the file.

FossilOrigin-Name: 727efa8559852012cf3381baf5fcb1da198ff27d8856ce7b813920b99367dee5
This commit is contained in:
drh
2025-07-31 09:45:20 +00:00
parent 67695a30ea
commit 1e687a4187
3 changed files with 12 additions and 8 deletions

View File

@@ -1452,6 +1452,10 @@ static int findInodeInfo(
storeLastErrno(pFile, errno);
return SQLITE_IOERR;
}
if( fsync(fd) ){
storeLastErrno(pFile, errno);
return SQLITE_IOERR_FSYNC;
}
rc = osFstat(fd, &statbuf);
if( rc!=0 ){
storeLastErrno(pFile, errno);