* path.cc (_readlink): Return ENOENT when file does not exist.

This commit is contained in:
Christopher Faylor 2000-10-31 23:01:21 +00:00
parent 0f34137539
commit 772e2322bd
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Tue Oct 31 17:57:52 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (_readlink): Return ENOENT when file does not exist.
Tue Oct 31 23:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_dev_raw): Add method `fixup_after_exec'.

View File

@ -2371,6 +2371,12 @@ readlink (const char *path, char *buf, int buflen)
return -1;
}
if (pathbuf.file_attributes () == (DWORD) -1)
{
set_errno (ENOENT);
return -1;
}
if (!pathbuf.issymlink ())
{
if (pathbuf.fileattr != (DWORD) -1)