From ee99a3bff4d9b9b50cb6557eeb54707c60486e84 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 8 Dec 2001 22:07:05 +0000 Subject: * path.cc (path_conv::check): Use full path name for determining attributes when /cygdrive/x/foo. --- winsup/cygwin/path.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 01c3270..aa0ec54 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -481,10 +481,13 @@ path_conv::check (const char *src, unsigned opt, if (devn == FH_CYGDRIVE) { - if (component) - devn = FH_BAD; - fileattr = !unit ? FILE_ATTRIBUTE_DIRECTORY - : GetFileAttributes (full_path); + if (!component) + fileattr = FILE_ATTRIBUTE_DIRECTORY; + else + { + devn = FH_BAD; + fileattr = GetFileAttributes (this->path); + } goto out; } /* devn should not be a device. If it is, then stop parsing now. */ @@ -519,7 +522,7 @@ path_conv::check (const char *src, unsigned opt, if ((opt & PC_SYM_IGNORE) && pcheck_case == PCHECK_RELAXED) { - fileattr = GetFileAttributes (full_path); + fileattr = GetFileAttributes (this->path); goto out; } -- cgit v1.1