Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: readlink() bug. Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Kazuhiro Fujieda Date: 13 Oct 1999 09:23:02 +0900 Message-ID: Lines: 25 X-Mailer: Gnus v5.3/Emacs 19.34 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 * 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); ____ | AIST Kazuhiro Fujieda | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology