Skip to content

Commit f442b25

Browse files
gotalabclaude
andcommitted
fix: use Path.name for cross-platform directory extraction
Fixes #51 The validation logic used `path.rsplit("/", 1)[-1]` which only splits on forward slashes. On Windows, paths use backslashes, causing the full path to be compared against frontmatter.name instead of just the directory name. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 9ac6779 commit f442b25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/skillport/modules/skills/internal/validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def validate_skill_record(
6262
description = skill.get("description", "")
6363
lines = skill.get("lines", 0)
6464
path = skill.get("path", "")
65-
dir_name = path.rsplit("/", 1)[-1] if path else ""
65+
dir_name = Path(path).name if path else ""
6666

6767
# A1/A2: Key existence checks (only when meta is provided)
6868
if meta is not None:

0 commit comments

Comments
 (0)