diff options
-rw-r--r-- | apps/couch/src/couch_doc.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/couch/src/couch_doc.erl b/apps/couch/src/couch_doc.erl index d47f85ef..1c5d797d 100644 --- a/apps/couch/src/couch_doc.erl +++ b/apps/couch/src/couch_doc.erl @@ -47,8 +47,8 @@ revid_to_str(RevId) -> rev_to_str({Pos, RevId}) -> ?l2b([integer_to_list(Pos),"-",revid_to_str(RevId)]). - - + + revs_to_strs([]) -> []; revs_to_strs([{Pos, RevId}| Rest]) -> @@ -361,7 +361,7 @@ merge_stubs(#doc{id=Id,atts=MemBins}=StubsDoc, #doc{atts=DiskBins}) -> MergedBins = lists:map( fun(#att{name=Name, data=stub, revpos=StubRevPos}) -> case dict:find(Name, BinDict) of - {ok, #att{revpos=DiskRevPos}=DiskAtt} + {ok, #att{revpos=DiskRevPos}=DiskAtt} when DiskRevPos == StubRevPos orelse StubRevPos == nil -> DiskAtt; _ -> @@ -452,7 +452,7 @@ doc_from_multi_part_stream(ContentType, DataFun) -> unlink(Self) end), Parser ! {get_doc_bytes, self()}, - receive + receive {doc_bytes, DocBytes} -> Doc = from_json_obj(?JSON_DECODE(DocBytes)), % we'll send the Parser process ID to the remote nodes so they can |