Have the reset method take part in background loading

One instance of a call to _load_directory that I missed.
This commit is contained in:
Dave Pearson
2023-05-11 09:12:10 +01:00
parent 4ead43c149
commit ce7a78db69

View File

@@ -135,7 +135,7 @@ class DirectoryTree(Tree[DirEntry]):
def reload(self) -> None:
"""Reload the `DirectoryTree` contents."""
self.reset(str(self.path), DirEntry(Path(self.path)))
self._load_directory(self.root)
self._add_load_job(self.root)
def validate_path(self, path: str | Path) -> Path:
"""Ensure that the path is of the `Path` type.