aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2005-11-25 08:47:57 +0000
committerdanielk1977 <danielk1977@noemail.net>2005-11-25 08:47:57 +0000
commit0964b23a9914cfbbb6408936be61e95bdb4997c9 (patch)
tree90634667ae5c4e3d91773e87aff2dbfe71cbc086 /src/os_unix.c
parent94c1f6f7310f50562d71a64321a20f2856cb468a (diff)
downloadsqlite-0964b23a9914cfbbb6408936be61e95bdb4997c9.tar.gz
sqlite-0964b23a9914cfbbb6408936be61e95bdb4997c9.zip
Check the return code of full_fsync() when used to sync a directory fd. (CVS 2780)
FossilOrigin-Name: 84aae3b0ae7381710ff0bc9881cbde3559bb580b
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index ea44217af..b37a90794 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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. */
}