Skip to content

Commit 79ff1f8

Browse files
cliffhallclaude
andcommitted
docs(filesystem): say only a directory is refused across filesystems
A symlink source is resolved by validatePath before the move, so its target is what moves, on one device or across two; the copy refuses a symlink only when one is swapped in after validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
1 parent 264e43f commit 79ff1f8

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎.changeset/5188-filesystem-move-exdev.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@modelcontextprotocol/server-filesystem": patch
33
---
44

5-
`move_file` now moves a regular file between allowed directories on different filesystems (mounts, disks or shares), where it used to fail with `EXDEV`: it copies the file to a newly created destination, keeping its permissions and modification time, then removes the source, and removes a partial copy if anything fails. A directory or a symbolic link still cannot be moved across filesystems, and now fails with an error that says so.
5+
`move_file` now moves a regular file between allowed directories on different filesystems (mounts, disks or shares), where it used to fail with `EXDEV`: it copies the file to a newly created destination, keeping its permissions and modification time, then removes the source, and removes a partial copy if anything fails. A directory still cannot be moved across filesystems, and now fails with an error that says so.

‎src/filesystem/README.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,8 @@ The server's directory access control follows this flow:
155155
disks), a regular file is moved by copying it to a newly created
156156
destination, with its permissions and modification time, and then removing
157157
the source. If the copy fails, the partial destination is removed and the
158-
source is left in place. A directory or a symbolic link cannot be moved
159-
across filesystems and fails with an error; move a directory's files one
160-
at a time instead
158+
source is left in place. A directory cannot be moved across filesystems
159+
and fails with an error; move its files one at a time instead
161160

162161
- **search_files**
163162
- Recursively search for files/directories that match or do not match patterns

0 commit comments

Comments
 (0)