www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/10/12/20:23:44

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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)
From: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
Date: 13 Oct 1999 09:23:02 +0900
Message-ID: <s1sg0zg9kih.fsf@jaist.ac.jp>
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 <fujieda AT jaist DOT ac DOT 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);

____
  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019