This is the mail archive of the
mailing list for the Cygwin project.
Re: Bug in mv (coreutils 6.10)
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com, kst at mib dot org
- Date: Wed, 26 Mar 2008 19:48:33 -0600
- Subject: Re: Bug in mv (coreutils 6.10)
- References: <20080326165642.GA29317@nuthaus.mib.org>
-----BEGIN PGP SIGNED MESSAGE-----
According to Keith Thompson on 3/26/2008 10:56 AM:
| (I used to use just "/", but Solaris for some supremely odd reason
| allows a file "foo" to be referred to as "foo/", so I've cultivated
| the habit of using "/.".)
Yes, that's a bug in older Solaris (but should be fixed in Solaris 10).
| I've recently found that the "mv" command, if given a second argument
| of "nosuchdir/.", if "nosuchdir" doesn't exist, treats it as a file
| name. I don't know whether this is specific to Cygwin or a bug in
| the current GNU coreutils.
Most likely a cygwin bug. Similar to the cygwin bug that foo/bar/.. is
treated as foo/, even if foo/bar does not exist. And to prove it:
$ mkdir example
$ cd example
$ touch foo
$ strace mv foo bar/. 2>&1 |grep rename
~ 450 103717 [main] mv 2476 rename: 0 = rename
That rename should have failed with ENOENT.
Don't work too hard, make some time for fun as well!
Eric Blake email@example.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html