From 2693c1ac5651248b79c3a7805615b043a901ae6f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 16 Mar 2005 21:20:56 +0000 Subject: * dir.cc: Rename opendir_* to dirent_* throughout. (opendir_states): Move and rename. * fhandler.h (dirent_states): to here. * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use raw readdir when skipping through entries since it is keeping track of "." and "..". (fhandler_cygdrive::seekdir): Use fhandler_disk_file::readdir to do everything. * fhandler_virtual.cc (fhandler_virtual::opendir): Set flag indicating that we provide . and .. (fhandler_virtual::seekdir): Ditto. (fhandler_virtual::rewinddir): Ditto. * fhandler_registry.cc (fhandler_registry::rewinddir): Ditto. --- winsup/cygwin/fhandler_virtual.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler_virtual.cc') diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_virtual.cc index 21798994a..32d700a4d 100644 --- a/winsup/cygwin/fhandler_virtual.cc +++ b/winsup/cygwin/fhandler_virtual.cc @@ -83,7 +83,7 @@ fhandler_virtual::opendir () dir->__handle = INVALID_HANDLE_VALUE; dir->__d_position = 0; dir->__d_dirhash = get_namehash (); - + dir->__flags = dirent_saw_dot | dirent_saw_dot_dot; res = dir; } } @@ -100,6 +100,7 @@ _off64_t fhandler_virtual::telldir (DIR * dir) void fhandler_virtual::seekdir (DIR * dir, _off64_t loc) { + dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot; dir->__d_position = loc; return; } @@ -108,6 +109,7 @@ void fhandler_virtual::rewinddir (DIR * dir) { dir->__d_position = 0; + dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot; return; } -- cgit v1.2.3