Merge PR #390: fix hidden directory filter broken on Windows
Authored by Farukest. Fixes #389. Replaces hardcoded forward-slash string checks ('/.git/', '/.hub/') with Path.parts membership test in _find_all_skills() and scan_skill_commands(). On Windows, str(Path) uses backslashes so the old filter never matched, causing quarantined skills to appear as installed.
This commit is contained in:
commit
7128f95621
3 changed files with 97 additions and 4 deletions
|
|
@ -26,8 +26,7 @@ def scan_skill_commands() -> Dict[str, Dict[str, Any]]:
|
|||
if not SKILLS_DIR.exists():
|
||||
return _skill_commands
|
||||
for skill_md in SKILLS_DIR.rglob("SKILL.md"):
|
||||
path_str = str(skill_md)
|
||||
if '/.git/' in path_str or '/.github/' in path_str or '/.hub/' in path_str:
|
||||
if any(part in ('.git', '.github', '.hub') for part in skill_md.parts):
|
||||
continue
|
||||
try:
|
||||
content = skill_md.read_text(encoding='utf-8')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue