]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_admin:fix bug about list and stats command 8200/head
authorqiankunzheng <zheng.qiankun@h3c.com>
Fri, 18 Mar 2016 18:53:06 +0000 (14:53 -0400)
committerqiankunzheng <zheng.qiankun@h3c.com>
Fri, 18 Mar 2016 18:58:19 +0000 (14:58 -0400)
result of bucket-list and bucket-stats are incorrect when The first character of bucket name is underline

Fixes:#15197
Signed-off-by: Qiankun Zheng <zheng.qiankun@h3c.com>
src/rgw/rgw_rados.cc

index 6d5856498d314e5cb83b19d57e46d15138465388..b9ee7ceae33f14c5e215c580f1fef9a91f291165 100644 (file)
@@ -4068,6 +4068,10 @@ int RGWRados::list_buckets_next(RGWObjEnt& obj, RGWAccessHandle *handle)
     }
 
     obj.key.set((*state)->get_oid());
+    if (obj.key.name[0] == '_') {
+      obj.key.name = obj.key.name.substr(1);
+    }
+
     (*state)++;
   } while (obj.key.name[0] == '.'); /* skip all entries starting with '.' */