]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objects can not be displayed which object name does not contain '.' when get the... 5738/head
authordwj192 <duanweijun@h3c.com>
Wed, 9 Sep 2015 02:12:57 +0000 (10:12 +0800)
committerdwj192 <duanweijun@h3c.com>
Wed, 9 Sep 2015 02:13:14 +0000 (10:13 +0800)
Fixes: #12963
Signed-off-by: Weijun Duan <duanweijun@h3c.com>
src/rgw/rgw_bucket.cc

index cfa5e204a44d8c2bbbf590e824717c34fdb587e5..b857a5fd08ff74ca6b728f6513a2d6589c63868e 100644 (file)
@@ -715,16 +715,19 @@ int RGWBucket::check_bad_index_multipart(RGWBucketAdminOpState& op_state,
       string oid = key.name;
 
       int pos = oid.find_last_of('.');
-      if (pos < 0)
-        continue;
-
-      string name = oid.substr(0, pos);
-      string suffix = oid.substr(pos + 1);
-
-      if (suffix.compare("meta") == 0) {
-        meta_objs[name] = true;
+      if (pos < 0) {
+        /* obj has no suffix */
+        all_objs[key] = oid;
       } else {
-        all_objs[key] = name;
+        /* obj has suffix */
+        string name = oid.substr(0, pos);
+        string suffix = oid.substr(pos + 1);
+
+        if (suffix.compare("meta") == 0) {
+          meta_objs[name] = true;
+        } else {
+          all_objs[key] = name;
+        }
       }
     }