This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 223869 - mv(1) command produces wrong error message
mv(1) command produces wrong error message
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
6
All Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks: FC6Update
  Show dependency treegraph
 
Reported: 2007-01-22 15:28 EST by Tamal Kanti Nath
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 5.97-12.5.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-19 04:25:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tamal Kanti Nath 2007-01-22 15:28:23 EST
Description of problem:
The mv(1) command produces a wrong error message.

Version-Release number of selected component (if applicable):
coreutils-5.97-12.2.fc6

How reproducible:
When I attempt to replace a non-empty directory with another directory, this
wrong error message occurs.

Steps to Reproduce:
1. mkdir -p a/b b
2. date > a/b/c.txt
3. mv b a

Actual results:
mv: cannot move `b' to a subdirectory of itself, `a/b'

Expected results:
mv: directory 'a/b' already exists

Additional info:
Replacement successfully occurs if the destination directory is empty.
Comment 1 Jim Meyering 2007-01-22 15:40:16 EST
FWIW, upstream (coreutils-6.7) gets this right now: It prints this:
mv: cannot move `b' to `a/b': Directory not empty

Tim, I don't see off-hand where I made that fix.  Let me know if you'd like details.
Comment 2 Tim Waugh 2007-01-23 05:22:17 EST
If we do another coreutils update for FC6 it would be nice to get this fix in.
Comment 3 Jim Meyering 2007-01-23 15:06:59 EST
The fix was on the trunk, between 5.92 and 6.0.  Looks safe.

    http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=36a288e41a6

Here's the log entry:

    * src/copy.c (copy_internal): Don't work around old NFS clients like
    SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
    ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
    a banal failure as a recursive move-into-self failure.
    Reported by Florent Bayle in <http://bugs.debian.org/376749>.
Comment 4 Fedora Update System 2007-04-18 18:37:19 EDT
Fixed in update: coreutils-5.97-12.5.fc6

Note You need to log in before you can comment on or make changes to this bug.