summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-03-31 00:02:15 -0700
committerGreg Farnum <greg@inktank.com>2013-06-17 10:57:26 -0700
commita8f9d57a15ad7a69d53aa8fc6090fd1b394b616a (patch)
tree3a782aff76c7f16d02fbdb7bf907c5a345eb0737
parente1d41901cde97a77fc1fda2d7f6e78a7cea61c5c (diff)
downloadceph-a8f9d57a15ad7a69d53aa8fc6090fd1b394b616a.tar.gz
rgw: translate object marker to raw format
Fixes: #4600 Object marker should be treated as an object, so that name is formatted correctly when getting the raw oid. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit b083dece36a050ec15ac41a275aeef0ece1ac009)
-rw-r--r--src/rgw/rgw_rados.cc17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 1fed42f5dd5..522dbbb7b5b 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -686,24 +686,17 @@ int RGWRados::list_objects(rgw_bucket& bucket, int max, string& prefix, string&
bool get_content_type, string& ns, bool *is_truncated, RGWAccessListFilter *filter)
{
int count = 0;
- string cur_marker = marker;
bool truncated;
- string ns_prefix;
if (bucket_is_system(bucket)) {
return -EINVAL;
}
result.clear();
- if (!ns.empty()) {
- ns_prefix = "_";
- ns_prefix += ns + "_";
- if (cur_marker < ns_prefix) {
- cur_marker = ns_prefix;
- } else if (cur_marker.substr(0, ns.size()) > ns_prefix) {
- truncated = false;
- goto done;
- }
- }
+
+ rgw_obj marker_obj;
+ marker_obj.set_ns(ns);
+ marker_obj.set_obj(marker);
+ string cur_marker = marker_obj.object;
do {
std::map<string, RGWObjEnt> ent_map;