Mail Archives: cygwin/2007/08/03/11:26:00
Eric Blake <ebb9 <at> byu.net> writes:
>
> However, there is still a bug:
And another bug, involving the rename of a directory onto a broken symlink.
On Linux:
$ mkdir a
$ ln -s b c
$ mv a c/
mv: cannot overwrite non-directory `c' with directory `a'
$ ./rename a c/
result -1, errno 20: Not a directory
But on cygwin:
$ mkdir a
$ ln -s b c
$ ./rename a c/
result 0, errno 0: No error
$ ls -Fd ?
b/ c@
Oops - rather than detecting that resolving c/ fails because b does not exist
as a directory (ENOTDIR), cygwin went ahead and moved the directory according
to the symlink contents of c.
I assume once you fix the above problem, that the following testcase will then
match linux' behavior:
$ ln -s d d
$ ./rename a d/
result -1, errno 20: Not a directory
rather than cygwin's current ELOOP behavior, which doesn't make sense, since d/
was not a valid pathname to be detecting a loop with.
$ ln -s d d
$ ./rename a d/
result -1, errno 92: Too many levels of symbolic links
--
Eric Blake
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -