From 9c67226dfc9f78663975d864bb0badd528d133c4 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 18 Apr 2013 13:30:45 -0700 Subject: [PATCH] rgw: fix get_obj() with zero sized obj Now that even zero sized objs have manifest a test had to be modified. Signed-off-by: Yehuda Sadeh (cherry picked from commit 4fbf9a75e23428fabb2a4b5f52e015a81685cdda) --- src/rgw/rgw_rados.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 5ca27a06a0369..39db566f99534 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2669,7 +2669,8 @@ int RGWRados::get_obj(void *ctx, void **handle, rgw_obj& obj, else len = end - ofs + 1; - if (astate->has_manifest) { + if (astate->has_manifest && + astate->manifest.objs.size() > 0) { /* now get the relevant object part */ map::iterator iter = astate->manifest.objs.upper_bound(ofs); /* we're now pointing at the next part (unless the first part starts at a higher ofs), -- 2.39.5