* fhandler_disk_file.cc (fhandler_cygdrive::readdir): Avoid reporting

inaccessible drives.
This commit is contained in:
Christopher Faylor 2001-11-25 03:28:16 +00:00
parent 21e379455a
commit ded250563f
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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++;

View File

@ -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 */