]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: fix RGWLibFS::setattr for directory objects 13778/head
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 3 Feb 2017 18:44:45 +0000 (13:44 -0500)
committerNathan Cutler <ncutler@suse.com>
Fri, 3 Mar 2017 14:06:36 +0000 (15:06 +0100)
Fixes: http://tracker.ceph.com/issues/18808
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 4ad5a9226852d6d564baf2e63278ed6c4c185ecb)

src/rgw/rgw_file.cc

index b87c388cb665a1fd5be361c9edb35579f9a3c05e..6325dc3a6ad519a528f0498dd6bc2e0b423482cf 100644 (file)
@@ -571,6 +571,10 @@ namespace rgw {
     buffer::list ux_key, ux_attrs;
     string obj_name{rgw_fh->relative_object_name()};
 
+    if (rgw_fh->is_dir()) {
+      obj_name += "/";
+    }
+
     RGWSetAttrsRequest req(cct, get_user(), rgw_fh->bucket_name(), obj_name);
 
     rgw_fh->create_stat(st, mask);