diff options
author | Christopher Faylor <me@cgf.cx> | 2001-12-08 01:27:10 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-12-08 01:27:10 +0000 |
commit | 397f94082db5acc1bf8c226a481ab7177642bbc3 (patch) | |
tree | 6d0010b597d5292040ca19333ba014578b74c49f /winsup | |
parent | 15a1d3f2fc71c25eb972d47d711d3774d6b49a42 (diff) | |
download | newlib-397f94082db5acc1bf8c226a481ab7177642bbc3.zip newlib-397f94082db5acc1bf8c226a481ab7177642bbc3.tar.gz newlib-397f94082db5acc1bf8c226a481ab7177642bbc3.tar.bz2 |
* path.cc (path_conv::check): Use full path name for determining attributes
when /cygdrive/x/foo.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index cd25e8e..17f63c9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2001-12-07 Christopher Faylor <cgf@redhat.com> + + * path.cc (path_conv::check): Use full path name for determining + attributes when /cygdrive/x/foo. + 2001-12-06 Christopher Faylor <cgf@redhat.com> * path.cc (path_conv::check): Reset FH_CYGDRIVE if iterating through 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; } |