]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: os.makedirs
authorSage Weil <sage@redhat.com>
Fri, 25 Oct 2019 21:24:40 +0000 (16:24 -0500)
committerSage Weil <sage@redhat.com>
Mon, 28 Oct 2019 17:15:47 +0000 (12:15 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon

index 30f3d211cd3e86048e9ae0815f868a1fb9e833fd..6f0199ab9b5a52be2e9192686d826d6cae246fdb 100755 (executable)
@@ -164,7 +164,10 @@ def is_fsid(s):
     return True
 
 def makedirs(dir, uid, gid, mode):
-    os.makedirs(dir, exist_ok=True, mode=mode)
+    if not os.path.exists(dir):
+        os.makedirs(dir, mode=mode)
+    else:
+        os.chmod(dir, mode)
     os.chown(dir, uid, gid)
     os.chmod(dir, mode)   # the above is masked by umask...