Skip to content
Snippets Groups Projects
Commit 1f9c5ebe authored by Jim MacArthur's avatar Jim MacArthur
Browse files

filebaseddirectory: Update index after descend

parent 3fce161d
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment