Commit c19c227e authored by Jean-Baptiste Petre's avatar Jean-Baptiste Petre

fix function chownDirectory slapformat

parent 4d8a1270
......@@ -18,8 +18,9 @@ def mkdir_p(path, mode=0o777):
raise
def chownDirectory(path, uid, gid):
os.chown(path, uid, gid)
for root, dirs, files in os.walk(path):
for items in dirs, files:
for item in items:
if not os.path.islink(os.path.join(root, item)):
os.chown(os.path.join(root, item), uid, gid)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment