This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix readdir version 2


2006-01-03  Eric Blake  <ebb9@byu.net>

	* dir.cc (readdir_worker): Update saw_dot* flags in version 2.

Index: cygwin/dir.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/dir.cc,v
retrieving revision 1.99
diff -u -r1.99 dir.cc
--- cygwin/dir.cc       19 Dec 2005 04:00:41 -0000      1.99
+++ cygwin/dir.cc       3 Jan 2006 15:29:32 -0000
@@ -1,6 +1,6 @@
 /* dir.cc: Posix directory-related routines
 
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2006 Red Hat, Inc.
 
 This file is part of Cygwin.
 
@@ -105,6 +105,13 @@
       {
        de->__invalid_d_ino = 0;
        de->__ino32 = 0;
+       if (de->d_name[0] == '.')
+         {
+           if (de->d_name[1] == '\0')
+              dir->__flags |= dirent_saw_dot;
+            else if (de->d_name[1] == '.' && de->d_name[2] == '\0')
+              dir->__flags |= dirent_saw_dot_dot;
+          }
       }
     else
       {





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]