Improve broken symlink removal

This commit is contained in:
VirtuBox
2024-04-21 17:37:30 +02:00
parent e7eb865648
commit 8ddaa7e98f
4 changed files with 13 additions and 10 deletions

View File

@@ -318,10 +318,9 @@ class WOFileUtils():
"""
links = []
broken = []
ignored_dirs = ['./.git', './htdocs']
for root, dirs, files in os.walk(sympath):
if any(root.startswith(ignore_dir) for ignore_dir in ignored_dirs):
if root.startswith('./.git'):
# Ignore the .git directory.
continue
for filename in files: