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=8fb15edf79757a24f3c788553d4befcd587a680a;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 48c7b2a31df0..e12a517178fc 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2610,7 +2610,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),