From: Yehuda Sadeh Date: Thu, 18 Apr 2013 20:30:45 +0000 (-0700) Subject: rgw: fix get_obj() with zero sized obj X-Git-Tag: v0.67-rc1~128^2~151 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4fbf9a75e23428fabb2a4b5f52e015a81685cdda;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 --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 1e84d89361f..679cbb1da31 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3086,7 +3086,8 @@ int RGWRados::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **hand 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),