aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-06-14 23:52:53 +0000
committerChristopher Faylor <me@cgf.cx>2005-06-14 23:52:53 +0000
commit0fc9cf11f84797e28168fbbc1d63a72fc50b7608 (patch)
tree8f6145fa93792600a210e76301fc0caf91d88099 /winsup/cygwin/path.cc
parentfbc0e572ce294782bdb13ff87ec5850b52a7b16f (diff)
downloadnewlib-0fc9cf11f84797e28168fbbc1d63a72fc50b7608.zip
newlib-0fc9cf11f84797e28168fbbc1d63a72fc50b7608.tar.gz
newlib-0fc9cf11f84797e28168fbbc1d63a72fc50b7608.tar.bz2
* path.cc (path_conv::check): Always reset to FH_FS when component != 0 and
FH_NETDRIVE to fix problems with strict case checking.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc25
1 files changed, 11 insertions, 14 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 7ba5b51..1e315e4 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -886,22 +886,19 @@ out:
error = EROFS;
return;
}
+ else if (dev.devn == FH_NETDRIVE && component)
+ {
+ /* This case indicates a non-existant resp. a non-retrievable
+ share. This happens for instance if the share is a printer.
+ In this case the path must not be treated like a FH_NETDRIVE,
+ but like a FH_FS instead, so the usual open call for files
+ is used on it. */
+ dev.parse (FH_FS);
+ }
else if (isvirtual_dev (dev.devn) && fileattr == INVALID_FILE_ATTRIBUTES)
{
- if (dev.devn == FH_NETDRIVE && component)
- {
- /* This case indicates a non-existant resp. a non-retrievable
- share. This happens for instance if the share is a printer.
- In this case the path must not be treated like a FH_NETDRIVE,
- but like a FH_FS instead, so the usual open call for files
- is used on it. */
- dev.parse (FH_FS);
- }
- else
- {
- error = dev.devn == FH_NETDRIVE ? ENOSHARE : ENOENT;
- return;
- }
+ error = dev.devn == FH_NETDRIVE ? ENOSHARE : ENOENT;
+ return;
}
else if (!need_directory || error)
/* nothing to do */;