diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-11-12 11:04:25 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-11-25 09:45:22 +0100 |
commit | 470efb7ed68783eec0e70e8323ff48d1d7e55456 (patch) | |
tree | 0f0a930334722ac15f70f16508d32ef168a3a779 | |
parent | 456e942c5919285192f8f0aaf99e9368c9b3d1e1 (diff) | |
download | buildstream-470efb7ed68783eec0e70e8323ff48d1d7e55456.tar.gz |
tar.py: Make directories with incorrect permissions traversable
-rw-r--r-- | src/buildstream/plugins/sources/tar.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buildstream/plugins/sources/tar.py b/src/buildstream/plugins/sources/tar.py index 658cc2735..a5b84613e 100644 --- a/src/buildstream/plugins/sources/tar.py +++ b/src/buildstream/plugins/sources/tar.py @@ -76,8 +76,12 @@ class ReadableTarInfo(tarfile.TarInfo): @property def mode(self): - # ensure file is readable by owner - return self.__permission | 0o400 + # ensure file is readable by owner, and executable + # (=traversable) if it's a directory. + if self.isdir(): + return self.__permission | 0o500 + else: + return self.__permission | 0o400 @mode.setter def mode(self, permission): |