This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [1.7] rename/renameat error
On Sep 24 21:31, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Christopher Faylor on 9/23/2009 10:41 AM:
> >> Also less risky would be to make changes locally in mkdir, link, and
> >> rename for now.
>
> Done - this patch narrows the scope of the changes to just the interfaces
> in question. I've also tested that it made it through the coreutils
> testsuite without any regressions.
>
> >
> > I'm not clear if this is a regression or not. If it isn't a regression,
> > I'd opt for leaving it until 1.7.2.
>
> Now that I'm not touching path.cc, these are all much more self-contained,
> and make cygwin more consistent with Linux. For example:
>
> touch a
> ln -s c b
> link a b/
>
> should fail because b/ is not an existing directory, but without this
> patch, it succeeds and creates the regular file c as a link to a.
>
> 2009-09-24 Eric Blake <ebb9@byu.net>
>
> * syscalls.cc (link): Delete obsolete comment. Reject directories
> and missing source up front.
> (rename): Use correct errno for trailing '.'. Allow trailing
> slash to newpath iff oldpath is directory.
> * dir.cc (mkdir): Reject dangling symlink with trailing slash.
> * fhandler_disk_file.cc (fhandler_disk_file::link): Reject
> trailing slash.
> * fhandler.cc (fhandler_base::link): Match Linux errno.
Looks good to me. Chris?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat