diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-05 11:45:50 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-01-30 20:43:07 +0100 |
commit | d1b0155d805ce51d8f155e648d1e9ad2edb95397 (patch) | |
tree | aa83b8c100173f6a5179eaf3e5503021c4337f63 /NEWS | |
parent | 67ebdb9f20465a0ba1084902230704f410edde3b (diff) | |
download | coreutils-d1b0155d805ce51d8f155e648d1e9ad2edb95397.tar.xz |
mv: allow moving symlink onto same-inode dest with >= 2 hard links
Normally, mv detects a few subtle cases in which proceeding with a
same-file rename would, with very high probability, cause data loss.
Here, we have found a corner case in which one of these same-inode
tests makes mv refuse to perform a useful operation. Permit that
corner case.
* src/copy.c (same_file_ok): Detect/exempt this case.
* tests/mv/symlink-onto-hardlink: New test.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
Initially reported by: Matt McCutchen in http://bugs.gnu.org/6960.
Raised again by Anders Kaseorg due to http://bugs.debian.org/654596.
Improved-by: Paul Eggert.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2,6 +2,15 @@ GNU coreutils NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** Bug fixes + + mv now lets you move a symlink onto a same-inode destination file that + has two or more hard links. Before, it would reject that, saying that + they are the same, implicitly warning you that the move would result in + data loss. In this unusual case, when not moving the symlink onto its + referent, there is no risk of data loss, since the symlink will + typically still point to one of the hard links. + * Noteworthy changes in release 8.15 (2012-01-06) [stable] |