summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_file.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl
index 8c82272d..6671bcc1 100644
--- a/src/couchdb/couch_file.erl
+++ b/src/couchdb/couch_file.erl
@@ -148,7 +148,7 @@ truncate(Fd, Pos) ->
%%----------------------------------------------------------------------
sync(Filepath) when is_list(Filepath) ->
- {ok, Fd} = file:open(Filepath, [read, raw]),
+ {ok, Fd} = file:open(Filepath, [append, raw]),
try file:sync(Fd) after file:close(Fd) end;
sync(Fd) ->
gen_server:call(Fd, sync, infinity).