Skip to content

Commit

Permalink
rgw: when listing objects, set locator key only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehuda Sadeh committed Jul 8, 2011
1 parent 2dd514a commit 44e76fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rgw/rgw_rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 44e76fb

Please sign in to comment.