From 438ee733d67dbde09718fe45271628763b27b8e1 Mon Sep 17 00:00:00 2001 From: Shahwat Dalal Date: Tue, 2 Jul 2019 12:53:54 +0100 Subject: utils.py: Add write permission to root path in _force_rmtree This is needed in the case where the temp directory permissions are changed between creation and deletion. --- src/buildstream/utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/buildstream/utils.py') diff --git a/src/buildstream/utils.py b/src/buildstream/utils.py index 775a11142..b5b554ee5 100644 --- a/src/buildstream/utils.py +++ b/src/buildstream/utils.py @@ -730,6 +730,8 @@ def _is_main_process(): # Recursively remove directories, ignoring file permissions as much as # possible. def _force_rmtree(rootpath, **kwargs): + + os.chmod(rootpath, 0o755) for root, dirs, _ in os.walk(rootpath): for d in dirs: path = os.path.join(root, d.lstrip('/')) -- cgit v1.2.1