| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The hardlink tracker keyed the inode map on Path::metadata(), which follows symlinks, so a symlink pointing at a hardlinked sibling joined its target's group. On a cross-device directory move, if the symlink was visited first, the regular files were "preserved" by linking to the copied symlink instead of being copied, then the source was unlinked: content destroyed, exit 0, no diagnostic. GNU mv moves all entries intact. Use symlink_metadata() at the three lookup sites and only group regular files. Thanks to @mtvb for the report and the diagnosis.
|
GNU testsuite comparison: Skipping an intermittent issue tests/tail/retry (passes in this run but fails in the 'main' branch) |
Sorry, something went wrong.
* tests/mv/part-hardlink-symlink.sh: New test, ensuring that moving a directory to another file system preserves the contents and the hard links of its regular files, as well as the symlinks pointing at them. * tests/local.mk (all_tests): Add it. uutils/coreutils#14170 Link: #337
| Back | FazBrowse Home | New Git URL |
The hardlink tracker keyed the inode map on Path::metadata(), which follows symlinks, so a symlink pointing at a hardlinked sibling joined its target's group. On a cross-device directory move, if the symlink was visited first, the regular files were "preserved" by linking to the copied symlink instead of being copied, then the source was unlinked: content destroyed, exit 0, no diagnostic. GNU mv moves all entries intact.
Use symlink_metadata() at the three lookup sites and only group regular files.
Thanks to @mtvb for the report and the diagnosis.