>From b2a1529ee656ed12c0420b6293c8f284821403ba Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 30 Jul 2017 15:38:56 -0700 Subject: [PATCH] canonicalize: fix EOVERFLOW commentary Problem reported by Bruno Haible in: http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00147.html * lib/canonicalize.c (canonicalize_filename_mode): * lib/canonicalize-lgpl.c (__realpath): Fix comments. --- ChangeLog | 6 ++++++ lib/canonicalize-lgpl.c | 2 +- lib/canonicalize.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5ef4b1d..72d5a77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-07-30 Paul Eggert + canonicalize: fix EOVERFLOW commentary + Problem reported by Bruno Haible in: + http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00147.html + * lib/canonicalize.c (canonicalize_filename_mode): + * lib/canonicalize-lgpl.c (__realpath): Fix comments. + Don't interpret EOVERFLOW to mean nonexistence * lib/fts.c (fts_stat): If lstat fails, report its errno, which may be EOVERFLOW; this is likely more useful than reporting the diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c index f76ea4c..9cb6803 100644 --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -270,7 +270,7 @@ __realpath (const char *name, char *resolved) #endif *dest = '\0'; - /* FIXME: if lstat fails with errno == EOVERFILE, + /* FIXME: if lstat fails with errno == EOVERFLOW, the entry exists. */ #ifdef _LIBC if (__lxstat64 (_STAT_VER, rpath, &st) < 0) diff --git a/lib/canonicalize.c b/lib/canonicalize.c index a2f533f..74f8524 100644 --- a/lib/canonicalize.c +++ b/lib/canonicalize.c @@ -232,6 +232,7 @@ canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode) } else if ((logical ? stat (rname, &st) : lstat (rname, &st)) != 0) { + /* FIXME: If errno == EOVERFLOW here, the entry exists. */ saved_errno = errno; if (can_mode == CAN_EXISTING) goto error; -- 2.7.4