Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-12-09 01:07:05 +0300
committerChristopher Faylor <me@cgf.cx>2001-12-09 01:07:05 +0300
commitee99a3bff4d9b9b50cb6557eeb54707c60486e84 (patch)
tree87f06009bc8373587b7a87dc30ae7362729a0fe2
parentf11d1d746accc3452aa548ca7624e88ece40b706 (diff)
* path.cc (path_conv::check): Use full path name for determining attributesunlabeled-1.188.2.1.8.2.2
when /cygdrive/x/foo.
-rw-r--r--winsup/cygwin/path.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 01c3270f6..aa0ec5454 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;
}