Skip to content

Comments

fix: handle spaces in filepaths for JetBrains autocomplete#10633

Open
sestinj wants to merge 1 commit intomainfrom
fix/spaces-in-filepath-2
Open

fix: handle spaces in filepaths for JetBrains autocomplete#10633
sestinj wants to merge 1 commit intomainfrom
fix/spaces-in-filepath-2

Conversation

@sestinj
Copy link
Contributor

@sestinj sestinj commented Feb 19, 2026

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 <noreply@anthropic.com>
@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
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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 2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

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

1 participant