Fix file rename on FUSE-based filesystems#51779
Merged
nathansobo merged 1 commit intozed-industries:mainfrom Mar 18, 2026
Merged
Fix file rename on FUSE-based filesystems#51779nathansobo merged 1 commit intozed-industries:mainfrom
nathansobo merged 1 commit intozed-industries:mainfrom
Conversation
nathansobo
approved these changes
Mar 18, 2026
Contributor
nathansobo
left a comment
There was a problem hiding this comment.
Seems reasonable enough. Thanks for your help!
AmaanBilwar
pushed a commit
to AmaanBilwar/zed
that referenced
this pull request
Mar 20, 2026
Fixes zed-industries#51778 #### Fix - Add `EINVAL` to the list of error codes that trigger the metadata-based rename fallback in `crates/fs/src/fs.rs` - FUSE filesystems (NTFS via ntfs-3g, exFAT, etc.) return `EINVAL` when `renameat2` is called with `RENAME_NOREPLACE`, since they don't support the flag. - The existing fallback already handles `ENOSYS`, `ENOTSUP`, and `EOPNOTSUPP` for similar unsupported-operation cases. #### Video [Screencast from 2026-03-17 23-37-35.webm](https://github.com/user-attachments/assets/77e35d97-a87c-4acf-99b8-0e74df667275) Release Notes: - Fixed file and directory renaming failing in the project panel on FUSE-based filesystems (e.g. NTFS, exFAT drives on Linux).
toshmukhamedov
pushed a commit
to toshmukhamedov/zed
that referenced
this pull request
Mar 20, 2026
Fixes zed-industries#51778 #### Fix - Add `EINVAL` to the list of error codes that trigger the metadata-based rename fallback in `crates/fs/src/fs.rs` - FUSE filesystems (NTFS via ntfs-3g, exFAT, etc.) return `EINVAL` when `renameat2` is called with `RENAME_NOREPLACE`, since they don't support the flag. - The existing fallback already handles `ENOSYS`, `ENOTSUP`, and `EOPNOTSUPP` for similar unsupported-operation cases. #### Video [Screencast from 2026-03-17 23-37-35.webm](https://github.com/user-attachments/assets/77e35d97-a87c-4acf-99b8-0e74df667275) Release Notes: - Fixed file and directory renaming failing in the project panel on FUSE-based filesystems (e.g. NTFS, exFAT drives on Linux).
This was referenced Mar 22, 2026
Closed
AmaanBilwar
pushed a commit
to AmaanBilwar/zed
that referenced
this pull request
Mar 23, 2026
Fixes zed-industries#51778 #### Fix - Add `EINVAL` to the list of error codes that trigger the metadata-based rename fallback in `crates/fs/src/fs.rs` - FUSE filesystems (NTFS via ntfs-3g, exFAT, etc.) return `EINVAL` when `renameat2` is called with `RENAME_NOREPLACE`, since they don't support the flag. - The existing fallback already handles `ENOSYS`, `ENOTSUP`, and `EOPNOTSUPP` for similar unsupported-operation cases. #### Video [Screencast from 2026-03-17 23-37-35.webm](https://github.com/user-attachments/assets/77e35d97-a87c-4acf-99b8-0e74df667275) Release Notes: - Fixed file and directory renaming failing in the project panel on FUSE-based filesystems (e.g. NTFS, exFAT drives on Linux).
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.
Fixes #51778
Fix
EINVALto the list of error codes that trigger the metadata-based rename fallback incrates/fs/src/fs.rsEINVALwhenrenameat2is called withRENAME_NOREPLACE, since they don't support the flag.ENOSYS,ENOTSUP, andEOPNOTSUPPfor similar unsupported-operation cases.Video
Screencast.from.2026-03-17.23-37-35.webm
Release Notes: