aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jim-aio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/jim-aio.c b/jim-aio.c
index abc7482..6baab10 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -1585,6 +1585,9 @@ static int aio_cmd_sync(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
AioFile *af = Jim_CmdPrivData(interp);
+ if (aio_flush(interp, af) != JIM_OK) {
+ return JIM_ERR;
+ }
fsync(af->fd);
return JIM_OK;
}