]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: fix last-of marker detection
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 10 Dec 2015 02:01:11 +0000 (21:01 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:06:25 +0000 (12:06 -0500)
Add the count of common_prefixes to the existing listing size, rather
than overwriting it, else size cannot be compared w/ix.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.h

index 2e190e35ca7e82718cdbc2248ff066da2ff2b96b..f53547f81aff76eb2490ec5b5a1e825521431ffb 100644 (file)
@@ -776,7 +776,7 @@ public:
                       (ix == size-1) ? true : false);
       ++ix;
     }
-    size = common_prefixes.size();
+    size += common_prefixes.size();
     for (auto& iter : common_prefixes) {
       std::string& pref = const_cast<std::string&>(iter.first);
       if (pref.back() == '/')