[1.7] rename/renameat error
Wed Sep 23 12:59:00 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
According to Eric Blake on 9/22/2009 3:02 PM:
> I've got a patch in testing for both of these issues.
Does this look okay to apply? The fix in path.cc affects more than just
link, hence I had to add a new option to keep mkdir("d/",mode) still
working, while link("file","d/") now fails with the same ENOENT as Linux.
rename was tricky, as rename("file","d/") must fail whether or not d
exists, while rename("dir","d/") must succeed if d does not exist or
exists and is empty. I think I got it all, but it can't hurt to
2009-09-23 Eric Blake <email@example.com>
* path.h (PC_MKDIR): New enum value.
* path.cc (check): Ensure 'a/' resolves to a directory.
* syscalls.cc (link): Fix comment.
(rename): Use correct errno for trailing '.'. Allow trailing
slash to newpath iff oldpath is directory.
* dir.cc (mkdir): Allow trailing slash.
Don't work too hard, make some time for fun as well!
Eric Blake firstname.lastname@example.org
-----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/
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Cygwin-patches