From 44e76fb825185458a2434575e09b7249897a44d9 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 6 Jul 2011 13:32:31 -0700 Subject: [PATCH] rgw: when listing objects, set locator key only when needed --- 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 d97b1b05a0754..a507e186d1c87 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -214,7 +214,8 @@ int RGWRados::list_objects(string& id, string& bucket, int max, string& prefix, } uint64_t s; - io_ctx.locator_set_key(key); + if (key.compare(name) != 0) + io_ctx.locator_set_key(key); if (io_ctx.stat(oid, &s, &obj.mtime) < 0) continue; obj.size = s;