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
{{ message }}
Repository navigation
mv: cross-device directory move writes through a symlink that appears in the destination #14991
When a directory is moved across filesystems, mv falls back to copying it, and each destination entry is created by joining a path, with regular files going through fs::copy. If a symlink appears at one of those names in the destination while the copy is running, it is followed, so that file's content (and the truncation before it) lands wherever the symlink points.
To reproduce, move a directory with many files from one filesystem to another (e.g. into /dev/shm) while another process keeps creating symlinks at the destination names, pointing at a file outside the tree. That file ends up overwritten with the source content.
Activity
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination
mv: create cross-device directory entries relative to the destination