summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2009-05-25 21:59:17 +0000
committerDamien F. Katz <damien@apache.org>2009-05-25 21:59:17 +0000
commit6a1122024eae24fb68f6baf57caddd48bdb37ec6 (patch)
tree33b8aea57df9ee1a694de524397c2a0d1b221aec
parent16ccd4c0b8ae4272fa27d32948658b1424a291fc (diff)
Fix for binary chunks being out of order with new tail append code
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@778521 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_stream.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_stream.erl b/src/couchdb/couch_stream.erl
index bf9fd3c2..1f12e632 100644
--- a/src/couchdb/couch_stream.erl
+++ b/src/couchdb/couch_stream.erl
@@ -123,10 +123,10 @@ handle_call(close, _From, Stream) ->
case Buffer of
[] ->
- Result = {Written, WrittenLen};
+ Result = {lists:reverse(Written), WrittenLen};
_ ->
{ok, Pos} = couch_file:append_binary(Fd, lists:reverse(Buffer)),
- Result = {[Pos|Written], WrittenLen + BufferLen}
+ Result = {lists:reverse(Written, [Pos]), WrittenLen + BufferLen}
end,
{stop, normal, Result, Stream}.