From 6a1122024eae24fb68f6baf57caddd48bdb37ec6 Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Mon, 25 May 2009 21:59:17 +0000 Subject: 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 --- src/couchdb/couch_stream.erl | 4 ++-- 1 file 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}. -- cgit v1.2.3