diff --git a/moulinette/utils/filesystem.py b/moulinette/utils/filesystem.py index aeb21959..54eb3e08 100644 --- a/moulinette/utils/filesystem.py +++ b/moulinette/utils/filesystem.py @@ -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):