anchor.diff:  enforce_part_size(PartsToKeep) ->
       case riak_cs_utils:get_env(riak_cs, enforce_multipart_part_size, true) of
           true ->
  -            Sizes = [P?PART_MANIFEST.content_length || P <- PartsToKeep],
  -            io:format("Sizes ~p\n", [Sizes]),
  -            case length(PartsToKeep) of
  -                5 ->
  -                    throw(entity_too_small);
  -                _ ->
  -                    eval_part_sizes(Sizes)
  -            end;
  +            eval_part_sizes([P?PART_MANIFEST.content_length || P <- PartsToKeep]);
           false ->
               true
       end.
   
  -eval_part_sizes(Sizes) ->
  -    case eval_part_sizes2(Sizes) of
  -        []     -> true;
  -        [last] -> true;
  -        _      -> false
  -    end.
  -
  -eval_part_sizes2([Size, _|T]) when Size < ?MIN_MP_PART_SIZE ->
  -    [Size|eval_part_sizes(T)];
  -eval_part_sizes2([Size]) when Size < ?MIN_MP_PART_SIZE ->
  -    [last];
  -eval_part_sizes2([_Size|T]) ->
  -    eval_part_sizes2(T);
  -eval_part_sizes2([]) ->
  -    [].
  +eval_part_sizes([]) ->
  +    true;
  +eval_part_sizes([_]) ->
  +    true;
  +eval_part_sizes(L) ->
  +    case lists:min(lists:sublist(L, length(L)-1)) of
  +        X when X < ?MIN_MP_PART_SIZE ->
  +            throw(entity_too_small);
  +        _ ->
  +            true
  +    end.
   
   %% The intent of the wrap_* functions is to make this module's code
   %% flexible enough to support two methods of operation:
  
positive.code: -ifdef(TEST).
  
  eval_part_sizes_test() ->
      true = eval_part_sizes([]),
      true = eval_part_sizes([999888777]),
      true = eval_part_sizes([777]),
      false = eval_part_sizes([1,51048576,51048576,51048576,436276]),
      false = eval_part_sizes([51048576,1,51048576,51048576,436276]),
      false = eval_part_sizes([51048576,1,51048576,51048576,436276]),
      false = eval_part_sizes([1,51048576,51048576,51048576]),
      false = eval_part_sizes([51048576,1,51048576,51048576]),
      true  = eval_part_sizes([51048576,51048576,51048576,1]),
      ok.
  
  eval_part_sizes_eqc_test() ->
      true = eqc:quickcheck(eqc:numtests(500, prop_part_sizes())).
  
  prop_part_sizes() ->
      Min_1 = ?MIN_MP_PART_SIZE - 1,
      Min = ?MIN_MP_PART_SIZE,
      Min100 = ?MIN_MP_PART_SIZE + 100,
      ?FORALL({L, Last, Either},
              {list(choose(Min, Min100)), choose(0, Min_1), choose(0, Min100)},
              true == eval_part_sizes(L ++ [Last]) andalso
              false == eval_part_sizes(L ++ [Min_1] ++ L ++ [Either])
             ).
  
  %% The test_0() and test_1() commands can be used while Riak CS is running.
  %% In fact, it's preferred (?) to do it that way because then all of the
  
negative.code:          user_rec_to_3tuple/1
          ]).
  -export([get_mp_manifest/1]).
  
  %%%===================================================================
  %%% API
  