mv: better diagnostic for 'mv dir x' failure
commit3cb862ce5f10db392cc8e6907dd9d888acfa2a30
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 22 Jul 2023 20:39:17 +0000 (22 13:39 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 22 Jul 2023 20:41:07 +0000 (22 13:41 -0700)
treeff54b3eeab8890bdfa8503a76dd102c2d2739200
parentb0e41e3f3016700c86f2e9b9c2ab9a49e9774a21
mv: better diagnostic for 'mv dir x' failure

Problem reported by Nir Oren <https://bugs.gnu.org/64785>.
* src/copy.c (copy_internal): Use a more-specific diagnostic when
a rename fails due to a problem that must be due to the
destination, avoiding user confusion in cases like 'mv dir x'
where x is a nonempty directory.
* tests/mv/dir2dir.sh: Adjust to match.
NEWS
src/copy.c
tests/mv/dir2dir.sh