This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: New rename(2) function
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin-developers at cygwin dot com
- Date: Tue, 07 Aug 2007 06:54:12 -0600
- Subject: Re: New rename(2) function
- References: <20070731155745.GE21952@calimero.vinschen.de>
According to Corinna Vinschen on 7/31/2007 9:57 AM:
> It's rather tricky to explain how it tries to behave, but I do my best
> below. If you (or others) think there's a thinko in the plan, or you
> find corner cases which behave strange or unexpected (that's probably
> what's called a "bug"), I would like to discuss it here on
> cygwin-developers.
Just for closure (since I originally these two corner cases via gmane on
the main list), the rename function is still non-compliant in these two
examples:
$ mkdir -p b/c a/b
$ mv b a
currently fails, but should overwrite empty a/b with populated ./b,
resulting in a/b/c.
$ mkdir d
$ ln -s e f
$ mv d f/
currently succeeds, but should fail with ENOTDIR, because f/ does not
resolve to an existing directory.
Also, the check for link count >= 2 might also be optimized to skip
directories (whose link count is always > 1, but since directories can't
be hard-linked, it is not worth looking up their id).
--
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net