Skip to content

Fix Rider plugin IOException for non-local VFS files#1822

Merged
belav merged 2 commits intobelav:mainfrom
rcdailey:fix/rider-plugin-vfs-filter
Mar 4, 2026
Merged

Fix Rider plugin IOException for non-local VFS files#1822
belav merged 2 commits intobelav:mainfrom
rcdailey:fix/rider-plugin-vfs-filter

Conversation

@rcdailey
Copy link
Contributor

Summary

Filter out non-local virtual files (git index, JARs, etc.) in the Rider plugin's document change listener to prevent IOException when ProcessBuilder receives an invalid working directory.

Problem

The plugin's documentChanged listener receives events from all virtual file systems, including Rider's git index VFS (GitIndexFileSystemRefresher). These files have paths like 7fa4270e:/home/user/project:/home/user/project/src/File.cs which are internal VFS identifiers, not valid filesystem paths. When this path is used as a ProcessBuilder working directory, it fails with:

java.io.IOException: Cannot run program "/usr/lib64/dotnet/dotnet"
  (in directory "7fa4270e:/home/robert/code/recyclarr-workspace/recyclarr:..."):
  error=2, No such file or directory

This is a regression of #1691, which attempted to fix the same issue using getCanonicalPath() with a fallback to getPath(). The fallback still fires because getCanonicalPath() returns null for git index VFS files.

Fix

Replace the getCanonicalPath()/getPath() fallback with an isInLocalFileSystem() guard that skips non-local files entirely. For files that pass this check, getPath() always returns a valid local path, so the canonical path logic and its fallback are removed as dead code.

rcdailey and others added 2 commits February 23, 2026 10:27
Rider's git index VFS fires document change events for virtual files
that are not on the local filesystem. Calling getPath() on these throws
an IOException, crashing the plugin.

Adding isInLocalFileSystem() filters them out before any path access.
This also removes the getCanonicalPath() fallback introduced in belav#1691,
which is no longer needed once non-local files are excluded earlier.
Copy link
Owner

@belav belav left a comment

Choose a reason for hiding this comment

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

Looks good! I'll get a new version published shortly but it can take a couple of days for jetbrains to approve it.

@belav belav enabled auto-merge (squash) March 4, 2026 14:24
@belav belav merged commit dab8d77 into belav:main Mar 4, 2026
7 checks passed
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.

2 participants