summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim@mode7.co.uk>2018-05-28 10:34:58 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-07-24 13:17:50 +0100
commitdf124e4566d08becf40d4cebf245c677f4b041d2 (patch)
tree84d34e5c09d81b0f07bb24ca190c2b2df7bb6968
parenta19a00abc78715c6cf0e7de91c30613acae069ed (diff)
downloadbuildstream-df124e4566d08becf40d4cebf245c677f4b041d2.tar.gz
_filebaseddirectory: Force re-read before descend.
This shouldn't be necessary - find out why output wasn't added.
-rw-r--r--buildstream/storage/_filebaseddirectory.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/buildstream/storage/_filebaseddirectory.py b/buildstream/storage/_filebaseddirectory.py
index 57de1ef2c..91bb7763c 100644
--- a/buildstream/storage/_filebaseddirectory.py
+++ b/buildstream/storage/_filebaseddirectory.py
@@ -101,7 +101,13 @@ class FileBasedDirectory(Directory):
if subdirectory_spec[0] == "":
return self.descend(subdirectory_spec[1:], create)
+ # Forcibly re-read the directory.
+ # TODO: This shouldn't be necessary. Any extra directories created using
+ # 'descend' should have caused the index to be updated there, and we should
+ # never need to call _populate_index again. Find out why.
+ self._directory_read = False
self._populate_index()
+
if subdirectory_spec[0] in self.index:
entry = self.index[subdirectory_spec[0]]
if isinstance(entry, FileBasedDirectory):