diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e524c467a..0a3ae60ce 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2010-09-01 Corinna Vinschen + + * fhandler_netdrive.cc (fhandler_netdrive::readdir): Set d_type. + (fhandler_netdrive::seekdir): Fix test for readdir return value. + * fhandler_registry.cc (fhandler_registry::seekdir): Ditto. + 2010-09-01 Corinna Vinschen * include/cygwin/version.h: Bump DLL minor version number to 8. diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler_netdrive.cc index f3339a653..bd826fcfe 100644 --- a/winsup/cygwin/fhandler_netdrive.cc +++ b/winsup/cygwin/fhandler_netdrive.cc @@ -250,6 +250,7 @@ fhandler_netdrive::readdir (DIR *dir, dirent *de) if (de->d_ino <= UINT_MAX) de->d_ino = hash_path_name (0, nro->lpRemoteName); } + de->d_type = DT_DIR; res = 0; } @@ -265,7 +266,7 @@ fhandler_netdrive::seekdir (DIR *dir, long pos) if (pos < 0) return; while (dir->__d_position < pos) - if (!readdir (dir, dir->__d_dirent)) + if (readdir (dir, dir->__d_dirent)) break; } diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index e414efbb3..478b9cca4 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -657,7 +657,7 @@ fhandler_registry::seekdir (DIR * dir, long loc) */ rewinddir (dir); while (loc > (dir->__d_position & REG_POSITION_MASK)) - if (!readdir (dir, dir->__d_dirent)) + if (readdir (dir, dir->__d_dirent)) break; }