[fix] Recursive chmod was broken

This commit is contained in:
ljf 2017-02-08 15:54:59 +01:00
parent d057a1aa53
commit 9bcee881eb

View file

@ -101,9 +101,9 @@ def chmod(path, mode, fmode=None, recursive=False):
fmode = mode
for root, dirs, files in os.walk(path):
for d in dirs:
os.chmod(path, mode)
os.chmod(os.path.join(root,d), mode)
for f in files:
os.chmod(path, fmode)
os.chmod(os.path.join(root,f), fmode)
def rm(path, recursive=False, force=False):