From b7d72239479eac28984179ad4b4c614e279b6200 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 28 Feb 2006 20:26:52 +0000 Subject: [PATCH] * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive instead of isspecial. * path.h (path_conv::iscygdrive): New method. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_disk_file.cc | 4 ++-- winsup/cygwin/path.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index cf4994865..728f0d0fa 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2006-02-28 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive + instead of isspecial. + * path.h (path_conv::iscygdrive): New method. + 2006-02-28 Christopher Faylor * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 7eac123bf..7c324ded1 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1429,7 +1429,7 @@ fhandler_disk_file::opendir () set_errno (ENOMEM); goto free_dirname; } - else if (!pc.isspecial () && fhaccess (R_OK) != 0) + else if (!pc.iscygdrive () && fhaccess (R_OK) != 0) goto free_dirent; else { @@ -1461,7 +1461,7 @@ fhandler_disk_file::opendir () if (wincap.is_winnt ()) { d_cachepos (dir) = 0; - if (!pc.isspecial ()) + if (!pc.iscygdrive ()) { OBJECT_ATTRIBUTES attr; WCHAR wpath[CYG_MAX_PATH + 10]; diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 91e0b04a5..233dd15b8 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -153,6 +153,7 @@ class path_conv int isdevice () const {return dev.devn && dev.devn != FH_FS && dev.devn != FH_FIFO;} int isfifo () const {return dev == FH_FIFO;} int isspecial () const {return dev.devn && dev.devn != FH_FS;} + int iscygdrive () const {return dev.devn == FH_CYGDRIVE;} int is_auto_device () const {return isdevice () && !is_fs_special ();} int is_fs_device () const {return isdevice () && is_fs_special ();} int is_fs_special () const {return dev.is_fs_special ();}