This is the mail archive of the
cygwin-developers@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: readlink() bug.
- To: Kazuhiro Fujieda <fujieda at jaist dot ac dot jp>
- Subject: Re: readlink() bug.
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Wed, 13 Oct 1999 11:20:30 -0400
- Cc: cygwin-developers at sourceware dot cygnus dot com
- References: <s1sg0zg9kih.fsf@jaist.ac.jp>
Applied. Thanks.
-chris
On Wed, Oct 13, 1999 at 09:23:02AM +0900, Kazuhiro Fujieda wrote:
>readlink() should return ENOENT and not EINVAL when it can't
>find the target symlink.
>
>ChangeLog:
>Wed Oct 13 09:02:32 1999 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
> * path.cc (readlink): Return errno correctly when it can't find
> the target symlink.
>
>--- path.cc- Wed Oct 13 09:02:02 1999
>+++ path.cc Wed Oct 13 09:02:32 1999
>@@ -2224,6 +2224,9 @@ readlink (const char *path, char *buf, i
> return -1;
> }
>
>+ if (pathbuf.fileattr == (DWORD) -1)
>+ return -1;
>+
> if (!pathbuf.issymlink ())
> {
> set_errno (EINVAL);