Skip to content

fix(jetbrains): decode percent-encoded spaces in FileUtils paths - #13206

Open
BetterAndBetterII wants to merge 1 commit into
continuedev:mainfrom
BetterAndBetterII:fix/jetbrains-uri-percent-decode-13134
Open

fix(jetbrains): decode percent-encoded spaces in FileUtils paths#13206
BetterAndBetterII wants to merge 1 commit into
continuedev:mainfrom
BetterAndBetterII:fix/jetbrains-uri-percent-decode-13134

Conversation

@BetterAndBetterII

Copy link
Copy Markdown

Summary

JetBrains FileUtils.writeFile / findFile converted file:// URIs with VfsUtilCore.urlToPath and refreshAndFindFileByUrl. urlToPath only strips the protocol — it does not percent-decode — so a project path like C:\Unity Projects\My Project became a literal filesystem directory C:\Unity%20Projects\My%20Project\.continue.

This routes path conversion through UriUtils.uriToFile / java.net.URI so %20 (and other percent-escapes) decode before VfsUtil.createDirectories and VFS find. The Windows two-slash file://C:/... branch in UriUtils.parseUri now parses the URI string instead of using the 4-arg URI constructor, which would re-encode % as %25.

Tests

  • FileUtilsTest: writeFile / readFile / fileExists with file://.../Unity%20Projects/foo.txt create and read decoded Unity Projects/foo.txt, not a literal Unity%20Projects dir.
  • UriUtilsTest: Windows file://C:/Unity%20Projects/... path decodes to /C:/Unity Projects/....

Fixes #13134

VfsUtilCore.urlToPath does not percent-decode, so file:// URIs with %20
created literal %20 directories for project .continue folders. Route path
conversion through UriUtils.uriToFile / java.net.URI before VFS
createDirectories/find, and cover Unity%20Projects in unit tests.

Fixes continuedev#13134
@BetterAndBetterII
BetterAndBetterII requested a review from a team as a code owner August 30, 2026 19:47
@BetterAndBetterII
BetterAndBetterII requested review from sestinj and removed request for a team August 30, 2026 19:47
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@BetterAndBetterII

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JetBrains (Rider): project paths containing spaces are URI-encoded (%20) when creating the project .continue directory on Windows

1 participant