From bcdd93b35238000bc6195b9f59071b286575477b Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 14 Sep 2001 11:20:57 +0000 Subject: [PATCH] (Ffile_symlink_p): Fix last change. --- src/fileio.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index eba2ac0bbaf..20b7079700e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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); -- 2.39.5