GNU bug report logs -
#64785
Package: coreutils Version: 8.32-4+b1 program=mv
Previous Next
Reported by: Nir Oren <niro <at> edev.co>
Date: Sat, 22 Jul 2023 07:55:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #22 received at 64785 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I agree with Paul suggestion for an error message.
In any case, Coreutils 5.93 message was better than the current one
On Sat, Jul 22, 2023 at 8:37 PM Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> On 2023-07-22 03:19, Pádraig Brady wrote:
> > Given the subtleties in this area,
> > I'd be reluctant to adjust diagnostics here.
>
> I looked into this a bit more. Given "mv dir e" where e/dir is an
> existing nonempty directory, 7th Edition Unix fails this way:
>
> mv: e/dir exists
>
> Solaris 10 mv fails this way:
>
> mv: cannot rename dir to e/dir: File exists
>
> Coreutils 5.93 fails this way:
>
> mv: cannot overwrite directory `e/dir'
>
> Current coreutils fails this way:
>
> mv: cannot move 'dir' to 'e/dir': Directory not empty
>
> macOS fails this way:
>
> mv: rename dir to e/dir: Directory not empty
>
> If you ask me, none of these are all that good. Current coreutils and
> macOS give a confusing "Directory not empty" message (which directory?).
> Solaris 10 has a similar confusion. 7th Edition and coreutils 5.93 don't
> print strerror (errno).
>
> All things considered, how about if we go back to something like
> coreutils 5.93, except output strerror (errno) too? That is, something
> like this:
>
> mv: cannot overwrite 'e/dir': Directory not empty
>
> This focuses the user on the problem, avoiding confusion from the
> irrelevant source file name. We'd use this format if renameat fails with
> an errno that means the problem must be with the destination, and stick
> with the current format otherwise. Affected errno values would be
> EDQUOT, EISDIR, ENOSPC, EEXIST, ENOTEMPTY.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.