From: Matt Benjamin Date: Mon, 18 Feb 2019 21:14:52 +0000 (-0500) Subject: Revert "rgw: lifcycle: don't reject compound rules with empty prefix" X-Git-Tag: v14.1.0~69^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=287416765bbb9a9f750ebfe33083dcacff9e863e;p=ceph.git Revert "rgw: lifcycle: don't reject compound rules with empty prefix" Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index cbabd41da29b..8abb73a27a91 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)