GNU bug report logs - #64785
Package: coreutils Version: 8.32-4+b1 program=mv

Previous Next

Package: coreutils;

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 #14 received at 64785 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Nir Oren <niro <at> edev.co>
Cc: 64785 <at> debbugs.gnu.org
Subject: Re: bug#64785: Package: coreutils Version: 8.32-4+b1 program=mv
Date: Sat, 22 Jul 2023 19:25:26 +0100
On 22/07/2023 18:37, Paul Eggert 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.

Sounds good.

Thanks for looking into all the details.

Padraig




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.