From 143f04d671f1071dc3e7174aaff7a9b060ed1ff3 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 13 Feb 2018 10:18:08 -0800 Subject: [PATCH] rgw: parse old rgw_obj with namespace correctly Fixes: http://tracker.ceph.com/issues/22982 Signed-off-by: Yehuda Sadeh (cherry picked from commit c598e53c95ec09772353a12e9162464ccb76e0a8) --- src/rgw/rgw_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index fdb50af632acc..40bc5d9ce7e49 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -2046,7 +2046,7 @@ struct rgw_obj { if (pos < 0) { throw buffer::error(); } - key.name = key.name.substr(pos); + key.name = key.name.substr(pos + 1); } } } else { -- 2.39.5