Fix Rider plugin IOException for non-local VFS files#1822
Merged
belav merged 2 commits intobelav:mainfrom Mar 4, 2026
Merged
Conversation
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.
belav
approved these changes
Mar 4, 2026
Owner
belav
left a comment
There was a problem hiding this comment.
Looks good! I'll get a new version published shortly but it can take a couple of days for jetbrains to approve it.
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
Filter out non-local virtual files (git index, JARs, etc.) in the Rider plugin's document change listener to prevent IOException when
ProcessBuilderreceives an invalid working directory.Problem
The plugin's
documentChangedlistener receives events from all virtual file systems, including Rider's git index VFS (GitIndexFileSystemRefresher). These files have paths like7fa4270e:/home/user/project:/home/user/project/src/File.cswhich are internal VFS identifiers, not valid filesystem paths. When this path is used as aProcessBuilderworking directory, it fails with:This is a regression of #1691, which attempted to fix the same issue using
getCanonicalPath()with a fallback togetPath(). The fallback still fires becausegetCanonicalPath()returns null for git index VFS files.Fix
Replace the
getCanonicalPath()/getPath()fallback with anisInLocalFileSystem()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.