Skip to content

Commit

Permalink
Merge pull request ceph#26491 from ceph/revert-25926-wip-rgw-lc-prefix
Browse files Browse the repository at this point in the history
Revert "rgw: lifcycle: don't reject compound rules with empty prefix"
  • Loading branch information
mattbenjamin authored Feb 18, 2019
2 parents a941e28 + 2874167 commit 104edd0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/rgw/rgw_lc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,8 @@ bool RGWLifecycleConfiguration::_add_rule(const LCRule& rule)
if (rule.get_filter().has_tags()){
op.obj_tags = rule.get_filter().get_tags();
}

/* prefix is optional, update prefix map only if prefix...exists */
if (!prefix.empty()) {
auto ret = prefix_map.emplace(std::move(prefix), std::move(op));
return ret.second;
}

return true;
auto ret = prefix_map.emplace(std::move(prefix), std::move(op));
return ret.second;
}

int RGWLifecycleConfiguration::check_and_add_rule(const LCRule& rule)
Expand Down

0 comments on commit 104edd0

Please sign in to comment.