]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix list bucket with start maker and delimiter '/' will miss next object with...
authorTianshan Qu <tianshan@xsky.com>
Tue, 21 May 2019 10:50:06 +0000 (18:50 +0800)
committerTianshan Qu <tianshan@xsky.com>
Tue, 21 May 2019 11:15:00 +0000 (19:15 +0800)
'/' + 1 = '0', and the start marker will be skipped, so it will miss the
'0' object.

Fixes: http://tracker.ceph.com/issues/39989
Signed-off-by: Tianshan Qu <tianshan@xsky.com>
src/rgw/rgw_rados.cc

index 0a2ead992b63718b7113b7586879132d6ccb16e1..7487b68be7153b65f260bb75b113c65a7e8e0a27 100644 (file)
@@ -2398,15 +2398,8 @@ int RGWRados::Bucket::update_bucket_id(const string& new_bucket_id)
 static inline std::string after_delim(std::string_view delim)
 {
   // assert: ! delim.empty()
-  unsigned char e = delim.back();
-  delim.remove_suffix(1);
   std::string result{delim.data(), delim.length()};
-  if (uint8_t(e) < 255) {
-    result += char(++e);
-  } else {
-    result += e;
-    result += char(255);
-  }
+  result += char(255);
   return result;
 }