fix: handle spaces in filepaths for JetBrains autocomplete#10633
Open
fix: handle spaces in filepaths for JetBrains autocomplete#10633
Conversation
When VirtualFile.toUriOrNull() generates unencoded URIs with spaces, URI() throws. Fall back to File(path).toURI() which properly encodes the path. Fixes #10613 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
parseUri()to handle unencoded file URIs (e.g.file:///C:/src/test1 project/file.py) by falling back toFile(path).toURI()whenURI()throws on illegal charactersTest plan
UriUtilsTesttests continue to passtest unencoded spacestest passesFixes #10613
🤖 Generated with Claude Code
Summary by cubic
Fix URI parsing for unencoded file paths with spaces to stop JetBrains autocomplete from crashing. Adds a safe fallback when URI() rejects unencoded paths. Fixes #10613.
Written for commit a974f4b. Summary will update on new commits.