summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-08-01 16:36:51 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-08-15 15:33:05 +0100
commit0063210825651df13a6a38584661fbe4c73a734b (patch)
tree2d65de63079c815f5923a55fd96adbf5b68f9144
parentef8525c2af4fd2ad70111cfea47db7f1dce67182 (diff)
downloadbuildstream-0063210825651df13a6a38584661fbe4c73a734b.tar.gz
filebaseddirectory: Update index after descend
-rw-r--r--buildstream/storage/_filebaseddirectory.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/storage/_filebaseddirectory.py b/buildstream/storage/_filebaseddirectory.py
index 8956d303a..735179cb6 100644
--- a/buildstream/storage/_filebaseddirectory.py
+++ b/buildstream/storage/_filebaseddirectory.py
@@ -95,7 +95,8 @@ class FileBasedDirectory(Directory):
if create:
new_path = os.path.join(self.external_directory, subdirectory_spec[0])
os.makedirs(new_path, exist_ok=True)
- return FileBasedDirectory(new_path).descend(subdirectory_spec[1:], create)
+ self.index[subdirectory_spec[0]] = FileBasedDirectory(new_path).descend(subdirectory_spec[1:], create)
+ return self.index[subdirectory_spec[0]]
else:
error = "No entry called '{}' found in the directory rooted at {}"
raise VirtualDirectoryError(error.format(subdirectory_spec[0], self.external_directory))