This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New rename(2) function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]