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 <mbenjamin@redhat.com>
This commit is contained in:
Matt Benjamin 2015-12-09 21:01:11 -05:00
parent 4e9116ae52
commit f9173e89f2

View 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() == '/')