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
Searching for the error reveals that it is from Rust and happens when it tries to write to a file which hard links to the source file on another file system. Is the setting.json stored in /tmp or something?
Doesn't require hard links, just moving/renaming across file system boundaries.
I haven't looked at this code specifically, but likely Zed is likely writing the new content to a file and then renaming it into place. The thinking is that this makes the update more-atomic and there is little chance of a half-written settings file on disk.
I think we should be potentially able to stat the ~/.config/zed/settings.json (or the target file if it is a symlink) and the temporary dir to compare if they are on on the same filesystem and if so, use the existing code, and if not write the file in an alternate way.
stat -f=%d "$(readlink -f ~/.config/zed/settings.json)"
stat -f=%d /tmp
Summary
User home directories on volumes other than / prevent Zed from performing actions which modify ~/.config/zed/settings.json.
Steps to trigger the problem:
Actual Behavior:
Expected Behavior:
Settings file is saved.
Workaround:
Create a symlink at `~/
Editors note (@notpeter): I have not performed these steps and derived them from comments here:
Zed Version and System Specs
Zed: v0.150.0 (Zed Preview)
OS: macOS 15.0.0
Memory: 16 GiB
Architecture: x86_64
The text was updated successfully, but these errors were encountered: