diff --git a/storage.c b/storage.c index 1cf0a3b..0f882eb 100644 --- a/storage.c +++ b/storage.c @@ -122,7 +122,7 @@ found: fspath = alloca(pathlen); snprintf(fspath, pathlen, "%s/%s", storage_dir, file); if (!storage_read_only) { - fd = open(fspath, O_RDWR); + fd = open(fspath, O_RDWR | O_SYNC); if (fd < 0) { saved_errno = errno; fprintf(stderr, "[storage] failed to open '%s' (requested '%s'): %s\n",