fix(skill): resolve Windows path compatibility issue in FileSystemSkillRepository#915
Closed
lifl00001 wants to merge 29 commits intoagentscope-ai:mainfrom
Closed
fix(skill): resolve Windows path compatibility issue in FileSystemSkillRepository#915lifl00001 wants to merge 29 commits intoagentscope-ai:mainfrom
lifl00001 wants to merge 29 commits intoagentscope-ai:mainfrom
Conversation
…llRepository The getSource() method in FileSystemSkillRepository returned source identifiers containing colons (e.g., \"filesystem:resources_skills\"). When used with Path.resolve() on Windows, this caused InvalidPathException because colons are reserved characters on Windows file systems. Changes: - Changed separator from \":\" to \"_\" in getSource() method - Updated corresponding tests to expect new format Before: filesystem:parent_child After: filesystem_parent_child Fixes: Windows users can now use Skill system without path errors Platform impact: Windows (fixed), Linux/macOS (no impact, already worked) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
flli10 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Fix code style violations in DifyRAGExample.java: - Remove unused import (UserAgent) - Remove redundant empty line This fixes the spotless check failure in CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
CLA signed |
Contributor
Author
|
I have signed the CLA at https://cla-assistant.io/agentscope-ai/agentscope-java?pullRequest=915. Please recheck. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes Windows compatibility issue where
FileSystemSkillRepository.getSource()returns source identifiers containing colons (e.g.,filesystem:resources_skills), which causesInvalidPathExceptionwhen used withPath.resolve()on Windows file systems.Fixes: Windows users can now use the Skill system without path errors.
Root Cause
On Windows, the colon (
:) is a reserved character that can only be used for drive letters (e.g.,C:). WhenPath.resolve()encounters a path string containing a colon, the Windows file system validator throwsInvalidPathException.The error occurs in this call chain:
FileSystemSkillRepository.getSource() → returns "filesystem:resources_skills"
↓
AgentSkill.getSkillId() → returns "skill-name_filesystem:resources_skills"
↓
SkillBox.uploadSkillFiles() → calls targetDir.resolve(skillId)
↓
InvalidPathException: Illegal char <:> at index X
Changes
:to_ingetSource()methodFormat Change
filesystem:parent_childfilesystem_parent_childPlatform Impact
Testing
mvn spotless:applyexecutedChecklist