mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Don't cast a DirEntry.path to a Path any more
It's always a Path now.
This commit is contained in:
@@ -216,10 +216,9 @@ class DirectoryTree(Tree[DirEntry]):
|
||||
|
||||
def _load_directory(self, node: TreeNode[DirEntry]) -> None:
|
||||
assert node.data is not None
|
||||
dir_path = Path(node.data.path)
|
||||
node.data.loaded = True
|
||||
directory = sorted(
|
||||
self.filter_paths(dir_path.iterdir()),
|
||||
self.filter_paths(node.data.path.iterdir()),
|
||||
key=lambda path: (not path.is_dir(), path.name.lower()),
|
||||
)
|
||||
for path in directory:
|
||||
|
||||
Reference in New Issue
Block a user