This is the mail archive of the
cygwin
mailing list for the Cygwin project.
[1.7] rename/renameat error
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 07 Sep 2009 09:48:46 -0600
- Subject: [1.7] rename/renameat error
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
POSIX states that rename must fail with EINVAL if either argument ends in
'.' or '..' (after trailing slashes are stripped). Cygwin 1.7 is
detecting this situation (which is a step up from 1.5 which did the rename
anyways), but sets errno to EBUSY instead of EINVAL.
$ mkdir d1 d2
$ mv -T d1/. d2 # the -T forces a raw rename("d1/.","d2")
mv: cannot move `d1/.' to `d2': Device or resource busy
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqlK14ACgkQ84KuGfSFAYDdDwCfYSdpMnuGmEM9b6ux4vTRJV9I
UkAAnR6R7WPbGfgYr31xDxAxecWOu3BD
=O2KC
-----END PGP SIGNATURE-----
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple