diff options
author | Jürg Billeter <j@bitron.ch> | 2020-02-19 14:16:43 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-02-27 12:33:57 +0000 |
commit | be27f17fbb469076b0368e8bfaa729ab0371a017 (patch) | |
tree | 4b1671e1a9c880f24e1487bc41eb6914beb0362e /src/buildstream | |
parent | 5b2abcf66f6c05cce9b08c12e4129eab3164085f (diff) | |
download | buildstream-be27f17fbb469076b0368e8bfaa729ab0371a017.tar.gz |
_casbaseddirectory.py: Fix _exists()
It should return True for directories and symlinks as well.
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/storage/_casbaseddirectory.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildstream/storage/_casbaseddirectory.py b/src/buildstream/storage/_casbaseddirectory.py index 3ab11a6ed..91e81cdc8 100644 --- a/src/buildstream/storage/_casbaseddirectory.py +++ b/src/buildstream/storage/_casbaseddirectory.py @@ -794,14 +794,14 @@ class CasBasedDirectory(Directory): subdir = self.descend(*path[:-1], follow_symlinks=follow_symlinks) target = subdir.index.get(path[-1]) if target is not None: - if target.type == _FileType.REGULAR_FILE: - return True - elif follow_symlinks and target.type == _FileType.SYMLINK: + if follow_symlinks and target.type == _FileType.SYMLINK: linklocation = target.target newpath = linklocation.split(os.path.sep) if os.path.isabs(linklocation): return subdir.find_root()._exists(*newpath, follow_symlinks=True) return subdir._exists(*newpath, follow_symlinks=True) + else: + return True return False except VirtualDirectoryError: return False |