From f9173e89f22be93f713e7c98f02843b680af9ea2 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Wed, 9 Dec 2015 21:01:11 -0500 Subject: [PATCH] librgw: fix last-of marker detection 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 --- src/rgw/rgw_file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index 2e190e35ca7e8..f53547f81aff7 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -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(iter.first); if (pref.back() == '/') -- 2.39.5