[1.7] rename/renameat error
Eric Blake
ebb9@byu.net
Mon Sep 7 15:48:00 GMT 2009
-----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
More information about the Cygwin
mailing list