]> git.eshelyaron.com Git - emacs.git/commitdiff
(Ffile_symlink_p): Fix last change.
authorGerd Moellmann <gerd@gnu.org>
Fri, 14 Sep 2001 11:20:57 +0000 (11:20 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 14 Sep 2001 11:20:57 +0000 (11:20 +0000)
src/fileio.c

index eba2ac0bbaf756f95cf430a7ac9430ad8ff4d6cf..20b7079700edcb7c9dd63088ce9f12829baff459 100644 (file)
@@ -3106,15 +3106,18 @@ Otherwise returns nil.")
       
       errno = 0;
       valsize = readlink (XSTRING (filename)->data, buf, bufsize);
-      if (valsize == -1
+      if (valsize == -1)
+       {
 #ifdef ERANGE
          /* HP-UX reports ERANGE if buffer is too small.  */
-         && errno != ERANGE
+         if (errno == ERANGE)
+           valsize = bufsize;
+         else
 #endif
-         )
-       {
-         xfree (buf);
-         return Qnil;
+           {
+             xfree (buf);
+             return Qnil;
+           }
        }
     }
   while (valsize >= bufsize);