1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-27 08:52:26 +03:00

Check the return code of full_fsync() when used to sync a directory fd. (CVS 2780)

FossilOrigin-Name: 84aae3b0ae7381710ff0bc9881cbde3559bb580b
This commit is contained in:
danielk1977
2005-11-25 08:47:57 +00:00
parent 94c1f6f731
commit 0964b23a99
3 changed files with 11 additions and 9 deletions

View File

@@ -872,7 +872,9 @@ int sqlite3OsSync(OsFile *id, int dataOnly){
}
if( id->dirfd>=0 ){
TRACE2("DIRSYNC %-3d\n", id->dirfd);
full_fsync(id->dirfd, id->fullSync, 0);
if( full_fsync(id->dirfd, id->fullSync, 0) ){
return SQLITE_IOERR;
}
close(id->dirfd); /* Only need to sync once, so close the directory */
id->dirfd = -1; /* when we are done. */
}