aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
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. */
}