From 287416765bbb9a9f750ebfe33083dcacff9e863e Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Mon, 18 Feb 2019 16:14:52 -0500 Subject: [PATCH] Revert "rgw: lifcycle: don't reject compound rules with empty prefix" Signed-off-by: Matt Benjamin --- src/rgw/rgw_lc.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index cbabd41da29..8abb73a27a9 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -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) -- 2.47.3