You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #50974, symlinked settings.json can be opened and saved, but the worktree ends up rooted at the file itself rather than its parent directory, which causes this error to be logged when changing settings via the settings GUI:
bryanpth
changed the title
settings: fix symlinked settings file on windows
settings: fix incorrect worktree root for symlinked settings.json on Windows
Mar 15, 2026
maxdeviant
changed the title
settings: fix incorrect worktree root for symlinked settings.json on Windows
settings: Fix incorrect worktree root for symlinked settings.json on Windows
Mar 18, 2026
My apologies, I should've been more clear in the PR directly!
Canonicalizing the path basically makes sure that open_path gets the real resolved path directly so it can reuse the exisiting directory-level worktree.
Without it, open_path receives the symlink path (e.g: %APPDATA%\Zed\settings.json), it cannot find an exisiting worktree for it so it ends up creating a new one rooted at the file.
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
cla-signedThe user has signed the Contributor License Agreementfirst contributionthe author's first pull request to Zed. NOTE: the label application is automated via github actions
4 participants
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.
Closes #47007
After #50974, symlinked
settings.jsoncan be opened and saved, but the worktree ends up rooted at the file itself rather than its parent directory, which causes this error to be logged when changing settings via the settings GUI:Fixed by canonicalizing the symlink path before passing to
open_paths.Tested with a symlinked settings.json, both directly and through WSL.
Release Notes: