From 55c90fcc578398d3dc3b4994d26c5e6c776bcf3c Mon Sep 17 00:00:00 2001 From: qiankunzheng Date: Fri, 18 Mar 2016 14:53:06 -0400 Subject: [PATCH] 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 --- src/rgw/rgw_rados.cc | 4 ++++ 1 file changed, 4 insertions(+) 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 '.' */ -- 2.47.3