From 1aa76ad568b4dc7b0a68137fc7f2b6dedbcae492 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 10 Sep 2003 20:16:00 +0000 Subject: * fhandler_disk_file.cc (num_entries): Take . and .. into account if they do not exist since cygwin simulates them. (fhandler_cygdrive::fstat): Ditto. (fhandler_cygdrive::readdir): Don't do any specific tests on __d_position when seeing if a drive exists. --- winsup/cygwin/dir.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/cygwin/dir.cc') diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index c7edd8871..96ab1f282 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -129,12 +129,14 @@ readdir (DIR *dir) res = dir->__d_dirent; strcpy (res->d_name, "."); dir->__flags |= opendir_saw_dot; + dir->__d_position++; } else if (!(dir->__flags & opendir_saw_dot_dot)) { res = dir->__d_dirent; strcpy (res->d_name, ".."); dir->__flags |= opendir_saw_dot_dot; + dir->__d_position++; } } -- cgit v1.2.3