-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 9/7/2009 10:30 AM:
> Any objections to deleting the rename-dest-slash module? It performs a
> subset of the rename module,
Correction. As currently written, rename.m4 checks whether:
rm -rf d1 d2
mkdir d1
rename("d1/","d2")
fails, but POSIX 2008 permits this case, so the test is wrong. But POSIX
_does_ require
rm -rf d1 d2
touch d1
rename("d1/","d2")
to fail (in other words, the existing code needs to account for whether a
directory is being renamed, rather than blindly rejecting trailing slash).
Meanwhile, rename-dest-slash.m4 checks whether:
rm -rf d1 d2
mkdir d1
rename("d1","d2/")
fails, which POSIX 2008 does indeed require to fail. But note:
rm -rf d1 d2
mkdir d1 d2
rename("d1","d2/")
is required to pass. All of this is independent of the cygwin 1.5 bug,
where POSIX requires any rename attempt targeting an explicit . or .. to
fail with EINVAL.
I guess it's time for me to add a unit test.
- --
Don't work too hard, make some time for fun as well!
Eric Blake [email protected]
-----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/
iEYEARECAAYFAkqlPvIACgkQ84KuGfSFAYCxZACgsXNKwV8AjPrPTZPN0dfHEeIX
gfMAnAx25gaUe73an4YHzI+bi5vaOcVq
=BknH
-----END PGP SIGNATURE-----