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 across volumes turns a symlink into a regular-file copy of its target's contents — and leaves the source link in place #1365
Probe-verified (same-source mingw+Wine harness, two runs, GNU coreutils 9.4):
Fixture: file real.txt containing real\n, symlink lnk -> real.txt (relative). Command: mv lnk C:\v2mv\lnk (cross-volume; C: is a different drive).
WinuxCmd: exit 0. The destination C:\v2mv\lnk is a regular file containing the target's contents (real\n, 5 bytes) — the symlink was silently converted into a content copy. Worse, the source link lnk is still present afterwards (ls of the source dir shows lnk -> real.txt): the move did not move anything.
GNU (same fixture, mv lnk /dev/shm/v2mv/lnk across filesystems): the destination is a symlink whose text is still real.txt, and the source link is gone.
Expected (GNU)
A cross-volume move of a symlink recreates the link at the destination with its text preserved verbatim and removes the source. If link recreation is impossible, the command must fail — it must never silently substitute a regular-file copy and/or leave the source behind while reporting success.
Source
src/commands/mv.cpp: the cross-volume fallback resolves the link through GetFinalPathNameByHandleW and copies content; the recreate-link path and its source-removal step lose the link semantics.
Regression seed
In-repo test named with this issue number: the fixture above; assert destination is a symlink with text real.txt, source no longer exists, exit 0. A directory-symlink variant asserted too.
Fixed by #1403 (commit e7cac22): cross-volume mv of a symlink recreates the link verbatim at the destination (reads the link text, never CopyFileW of the target's contents) and removes the source. Regression pin issue1365_cross_volume_symlink_recreated_not_copied landed with the PR.
Activity
Merge pull request #1403 from unixwin/fix/winx5-fileops
caomengxuan666 commentedon Oct 27, 2026
Fixed by #1403 (commit e7cac22): cross-volume mv of a symlink recreates the link verbatim at the destination (reads the link text, never CopyFileW of the target's contents) and removes the source. Regression pin
issue1365_cross_volume_symlink_recreated_not_copiedlanded with the PR.