# HG changeset patch # User Gerd Moellmann # Date 1000466457 0 # Node ID f9c8c910fe9a355f1172ae8358fc6b93c3ae153e # Parent c5853621fe9bc18df202edb1a50a3f9a1c81ca70 (Ffile_symlink_p): Fix last change. diff -r c5853621fe9b -r f9c8c910fe9a src/fileio.c --- a/src/fileio.c Fri Sep 14 11:20:16 2001 +0000 +++ b/src/fileio.c Fri Sep 14 11:20:57 2001 +0000 @@ -3106,15 +3106,18 @@ 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);