* dirsearch.cc (Dir_cache::read_files): Ignore ENOTDIR errors.
authorIan Lance Taylor <ian@airs.com>
Sun, 3 Jul 2011 04:16:13 +0000 (04:16 +0000)
committerIan Lance Taylor <ian@airs.com>
Sun, 3 Jul 2011 04:16:13 +0000 (04:16 +0000)
gold/ChangeLog
gold/dirsearch.cc

index 28ade01341b7012dd4910e0ec2b287dc5f27e30f..4ac6808a412e5f230f45b2ac1ca523a31f35131b 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-02  Ian Lance Taylor  <iant@google.com>
+
+       * dirsearch.cc (Dir_cache::read_files): Ignore ENOTDIR errors.
+
 2011-07-01  Ian Lance Taylor  <iant@google.com>
 
        PR gold/12525
index a149db527d82475f6022a7351c3b5fc391e4cd58..1ae2055dc467d776e0775c58917c284112666c85 100644 (file)
@@ -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;