-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Corinna Vinschen on 9/22/2009 3:27 AM: > I reworked symlink's error handling so that in my testing I now get > the exact same error messages as on Linux: > > $ rm wqwqwq > $ ln -sT nowhere wqwqwq/ > ln: creating symbolic link `wqwqwq/': No such file or directory
One oddity left: $ touch a $ ln -sT nowhere a/ => EEXIST $ ln -sT nowhere a// => ENOTDIR On Linux, both fail with EEXIST (but this violates POSIX, since a/ does not exist). On Solaris, both fail with ENOTDIR (which makes more sense). The reason that cygwin is inconsistent is that you created newpath but only truncated the final /, rather than checking for multiple /. Here's once case where I think it might be smarter to match Solaris and fail with ENOTDIR regardless of how many trailing slashes, rather than matching Linux and failing with EEXIST, particularly since it is faster (we don't have to even bother with creating newpath); but if we want to match Linux, then we have to handle all trailing when creating newpath. But at least the testsuite where I originally found the issue now passes (since it accepts either EEXIST or ENOTDIR). So I could also live with inaction, making no further changes to your patch. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@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/ iEYEARECAAYFAkq4tukACgkQ84KuGfSFAYC6EQCfVw0pmvmTPiVDHvqer00mP6Me 7vgAn3yFprWCkfvelPJtYLL+FIO8+RUt =qOce -----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