Skip to content

Commit

Permalink
Convert Metadata before matching
Browse files Browse the repository at this point in the history
  • Loading branch information
windkit committed Jan 5, 2017
1 parent 32e3ec2 commit 46b6556
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/leo_storage_handler_object.erl
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,16 @@ prefix_search(ParentDir, Marker, MaxKeys) ->

%% @private
prefix_search_1(ParentDir, Marker, Key, V, Acc) ->
Meta = binary_to_term(V),
Meta_Pre = binary_to_term(V),
case leo_object_storage_transformer:transform_metadata(Meta_Pre) of
{error, Cause} ->
?error("prefix_search_1/5", [{key, Key}, {error, Cause}]),
Acc;
Meta ->
prefix_search_2(ParentDir, Marker, Key, Meta, Acc)
end.

prefix_search_2(ParentDir, Marker, Key, Meta, Acc) ->
InRange = case Marker of
[] ->
true;
Expand Down

0 comments on commit 46b6556

Please sign in to comment.