From: qiankunzheng Date: Fri, 18 Mar 2016 18:53:06 +0000 (-0400) Subject: rgw/rgw_admin:fix bug about list and stats command X-Git-Tag: v10.1.1~40^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8200%2Fhead;p=ceph.git rgw/rgw_admin:fix bug about list and stats command 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 --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 6d5856498d314..b9ee7ceae33f1 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -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 '.' */