From ae3a6d4fa3cfdf9daa38946945b2a6aa0c0e9fa8 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 3 Jul 2011 04:16:13 +0000 Subject: [PATCH] * dirsearch.cc (Dir_cache::read_files): Ignore ENOTDIR errors. --- gold/ChangeLog | 4 ++++ gold/dirsearch.cc | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 28ade01341..4ac6808a41 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2011-07-02 Ian Lance Taylor + + * dirsearch.cc (Dir_cache::read_files): Ignore ENOTDIR errors. + 2011-07-01 Ian Lance Taylor PR gold/12525 diff --git a/gold/dirsearch.cc b/gold/dirsearch.cc index a149db527d..1ae2055dc4 100644 --- a/gold/dirsearch.cc +++ b/gold/dirsearch.cc @@ -66,8 +66,9 @@ Dir_cache::read_files() DIR* d = opendir(this->dirname_); if (d == NULL) { - // We ignore directories which do not exist. - if (errno != ENOENT) + // We ignore directories which do not exist or are actually file + // names. + if (errno != ENOENT && errno != ENOTDIR) gold::gold_error(_("%s: can not read directory: %s"), this->dirname_, strerror(errno)); return;