mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-04 02:34:22 +00:00
parent
1cf2e481ee
commit
70697d0b51
1 changed files with 9 additions and 0 deletions
|
|
@ -64,6 +64,15 @@ public final class SkillPackagePolicy {
|
|||
throw new IllegalArgumentException("Package entry path must be normalized: " + rawPath);
|
||||
}
|
||||
|
||||
// Normalize SKILL.md basename case-insensitively
|
||||
int lastSlash = canonical.lastIndexOf('/');
|
||||
String fileName = lastSlash >= 0 ? canonical.substring(lastSlash + 1) : canonical;
|
||||
if (fileName.equalsIgnoreCase(SKILL_MD_PATH)) {
|
||||
canonical = lastSlash >= 0
|
||||
? canonical.substring(0, lastSlash + 1) + SKILL_MD_PATH
|
||||
: SKILL_MD_PATH;
|
||||
}
|
||||
|
||||
return canonical;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue