diff options
author | Christopher Faylor <me@cgf.cx> | 2001-11-25 03:28:16 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-11-25 03:28:16 +0000 |
commit | ded250563f2d756d91ccab996902ba5b8c47530c (patch) | |
tree | f540d63f262752ab9893de2e577e8db46869377f /winsup | |
parent | 21e379455ae6ab0f58ba55c5df3498363825ab7e (diff) | |
download | newlib-ded250563f2d756d91ccab996902ba5b8c47530c.zip newlib-ded250563f2d756d91ccab996902ba5b8c47530c.tar.gz newlib-ded250563f2d756d91ccab996902ba5b8c47530c.tar.bz2 |
* fhandler_disk_file.cc (fhandler_cygdrive::readdir): Avoid reporting
inaccessible drives.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/fork.cc | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9c44cb2..0118b20 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2001-11-24 Christopher Faylor <cgf@redhat.com> + * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Avoid reporting + inaccessible drives. + +2001-11-24 Christopher Faylor <cgf@redhat.com> + * path.cc (path_conv::check): Tighten FH_CYGDRIVE check to avoid matching trailing component, like other devices. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 7a596b8..1ce4893 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -804,6 +804,11 @@ fhandler_cygdrive::readdir (DIR *dir) set_errno (ENMFILE); return NULL; } + if (GetFileAttributes (pdrive) == (DWORD) -1) + { + pdrive += DRVSZ; + return readdir (dir); + } *dir->__d_dirent->d_name = cyg_tolower (*pdrive); dir->__d_dirent->d_name[1] = '\0'; dir->__d_position++; diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index a233ae4..8aa21a3 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -545,7 +545,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll, slow_pid_reuse (pi.hProcess); /* Wait for subproc to initialize itself. */ - if (!sync_with_child(pi, subproc_ready, TRUE, "waiting for longjmp")) + if (!sync_with_child (pi, subproc_ready, TRUE, "waiting for longjmp")) goto cleanup; /* CHILD IS STOPPED */ |