]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "rgw: lifcycle: don't reject compound rules with empty prefix" 26491/head
authorMatt Benjamin <mbenjamin@redhat.com>
Mon, 18 Feb 2019 21:14:52 +0000 (16:14 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Mon, 18 Feb 2019 21:29:33 +0000 (16:29 -0500)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_lc.cc

index cbabd41da29b23c6a8be07de25a36af71707ff13..8abb73a27a91da20df526c14da42b374fb38e65a 100644 (file)
@@ -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)