]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: fix RGWLibFS::setattr for directory objects 13252/head
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 3 Feb 2017 18:44:45 +0000 (13:44 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 3 Feb 2017 18:51:38 +0000 (13:51 -0500)
Fixes: http://tracker.ceph.com/issues/18808
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.cc

index f8a57735fd84fb6a627eee4acdb6ea0cdad55725..2abe76b483c161d2e8024be265e40713344961d2 100644 (file)
@@ -586,6 +586,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);