mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-30 17:33:50 +08:00
scripts/_common.py: exclude symlinks when obtaining pages directories (#18882)
This commit is contained in:
+3
-1
@@ -102,7 +102,9 @@ def get_pages_dir(root: Path) -> list[Path]:
|
||||
list (list of Path's): Path's of page entry and platform, e.g. "page.fr/common".
|
||||
"""
|
||||
|
||||
return [d for d in root.iterdir() if d.name.startswith("pages")]
|
||||
return [
|
||||
d for d in root.iterdir() if d.name.startswith("pages") and not d.is_symlink()
|
||||
]
|
||||
|
||||
|
||||
def test_get_pages_dir():
|
||||
|
||||
Reference in New Issue
Block a user