]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: fix RGWLibFS::setattr for directory objects
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 3 Feb 2017 18:44:45 +0000 (13:44 -0500)
committerNathan Cutler <ncutler@suse.com>
Tue, 4 Jul 2017 07:25:43 +0000 (09:25 +0200)
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 ee723f4610ac4fc773c7e183132725e93ae8983a..c7cd9c2b1cb9bb93a7c94bd6c7be0fe37ae2e41e 100644 (file)
@@ -607,6 +607,10 @@ namespace rgw {
 
     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);