diff options
author | Jan Lehnardt <jan@apache.org> | 2009-11-30 19:10:08 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-11-30 19:10:08 +0000 |
commit | a6d71c3b4e8f4a5a59e66999bd504753f5810bb6 (patch) | |
tree | 78143fd08219870f4d583033013220f37ae50b88 /src/couchdb/couch_stream.erl | |
parent | b232effb7b51c831c0eccfb553514bd2b0c41c0b (diff) |
Fix two issues for databases upgraded from 0.9.x:
- Compaction would fail.
- GET /db/doc?attachments=true would generate a 500.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@885542 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_stream.erl')
-rw-r--r-- | src/couchdb/couch_stream.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_stream.erl b/src/couchdb/couch_stream.erl index 65cf7126..2a873e4c 100644 --- a/src/couchdb/couch_stream.erl +++ b/src/couchdb/couch_stream.erl @@ -73,7 +73,8 @@ old_copy_to_new_stream(Fd, Pos, Len, DestFd) -> old_foldl(_Fd, null, 0, _Fun, Acc) -> Acc; old_foldl(Fd, OldPointer, Len, Fun, Acc) when is_tuple(OldPointer)-> - old_stream_data(Fd, OldPointer, Len, ?DEFAULT_STREAM_CHUNK, Fun, Acc). + {ok, Acc2, _} = old_stream_data(Fd, OldPointer, Len, ?DEFAULT_STREAM_CHUNK, Fun, Acc), + Acc2. foldl(_Fd, [], _Fun, Acc) -> Acc; |