From: Yehuda Sadeh Date: Thu, 18 Apr 2013 20:30:45 +0000 (-0700) Subject: rgw: fix get_obj() with zero sized obj X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c67226dfc9f78663975d864bb0badd528d133c4;p=ceph.git 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) --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 5ca27a06a03..39db566f995 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),