summaryrefslogtreecommitdiff
path: root/src/buildstream/utils.py
diff options
context:
space:
mode:
authorShahwat Dalal <sdalal29@bloomberg.net>2019-07-02 12:53:54 +0100
committerShahwat Dalal <sdalal29@bloomberg.net>2019-07-04 10:48:45 +0100
commit438ee733d67dbde09718fe45271628763b27b8e1 (patch)
treeacda735d6311dbf77e3b567801158bbf2c370dd4 /src/buildstream/utils.py
parent1be4a7f1ea65af2f8ee6391a01a14dc685f5be26 (diff)
downloadbuildstream-438ee733d67dbde09718fe45271628763b27b8e1.tar.gz
utils.py: Add write permission to root path in _force_rmtreeshashwatdalal/tar-file-extraction
This is needed in the case where the temp directory permissions are changed between creation and deletion.
Diffstat (limited to 'src/buildstream/utils.py')
-rw-r--r--src/buildstream/utils.py2
1 files changed, 2 insertions, 0 deletions
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('/'))