-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix: update global directory path conversion to use localPathToUri #8677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update global directory path conversion to use localPathToUri #8677
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the createNewGlobalRuleFile function where a local file system path was being passed to URI-based functions. The fix converts the global directory path to a URI format before passing it to joinPathsToUri.
Key changes:
- Added import for
localPathToUriutility function - Updated
createNewGlobalRuleFileto convert the global path to URI format before use - Reordered imports alphabetically
Comments suppressed due to low confidence (1)
core/config/workspace/workspaceBlocks.ts:187
- The catch block is redundant as it only re-throws the error without adding any additional context or handling. Since the try-catch doesn't provide any value, consider removing it entirely.
} catch (error) {
throw error;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
|
@lixiaoyang1992 thank you! |
|
🎉 This PR is included in version 1.29.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.34.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Function createNewGlobalRuleFile need fileUri to be uri, not path.
Checklist
Summary by cubic
Fixed path-to-URI conversion in createNewGlobalRuleFile by using localPathToUri for the global directory, ensuring rules are created with a proper URI and preventing path-related errors.
Written for commit 71e22ab. Summary will update automatically on new commits.