From 9bcee881ebd09e6a1b7931306e796a3703c01e93 Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 8 Feb 2017 15:54:59 +0100 Subject: [PATCH] [fix] Recursive chmod was broken --- moulinette/utils/filesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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):