Skip to content

Commit

Permalink
Merge a5cb39c into 1ccd73a
Browse files Browse the repository at this point in the history
  • Loading branch information
ldachary committed Feb 2, 2015
2 parents 1ccd73a + a5cb39c commit 8c56478
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/rgw/rgw_op.cc
Expand Up @@ -1945,10 +1945,14 @@ void RGWPutMetadata::execute()
/* no need to track object versioning, need it for bucket's data only */
RGWObjVersionTracker *ptracker = (s->object ? NULL : &s->bucket_info.objv_tracker);

/* check if obj exists, read orig attrs */
ret = get_obj_attrs(store, s, obj, orig_attrs, NULL, ptracker);
if (ret < 0)
return;
if (s->object) {
/* check if obj exists, read orig attrs */
ret = get_obj_attrs(store, s, obj, orig_attrs, NULL, ptracker);
if (ret < 0)
return;
} else {
orig_attrs = s->bucket_attrs;
}

/* only remove meta attrs */
for (iter = orig_attrs.begin(); iter != orig_attrs.end(); ++iter) {
Expand Down

0 comments on commit 8c56478

Please sign in to comment.