Skip to content

fix: handle spaces in filepaths for JetBrains autocomplete - #10633

Merged
RomneyDa merged 1 commit into
mainfrom
fix/spaces-in-filepath-2
Mar 10, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/spaces-in-filepath-2

Conversation

@sestinj

@sestinj sestinj commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix parseUri() to handle unencoded file URIs (e.g. file:///C:/src/test1 project/file.py) by falling back to File(path).toURI() when URI() throws on illegal characters
  • Add regression test for unencoded spaces in file paths

Test plan

  • Existing UriUtilsTest tests continue to pass
  • New test unencoded spaces test passes
  • Verify JetBrains autocomplete no longer crashes on file paths with spaces

Fixes #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.

  • Bug Fixes
    • parseUri: normalize file:// → file:///; if URI() fails on unencoded file:/// paths (e.g., spaces), fall back to File(path).toURI().
    • Added regression test for unencoded spaces; verified existing UriUtils tests continue to pass.

Written for commit a974f4b. Summary will update on new commits.

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 <[email protected]>
@sestinj
sestinj requested a review from a team as a code owner February 19, 2026 00:10
@sestinj
sestinj requested review from RomneyDa and removed request for a team February 19, 2026 00:10
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 19, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 10, 2026
@RomneyDa
RomneyDa merged commit 1638a92 into main Mar 10, 2026
48 of 52 checks passed
@RomneyDa
RomneyDa deleted the fix/spaces-in-filepath-2 branch March 10, 2026 07:00
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocomplete crashes with files having space in the filepath/filename.

2 participants