summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 7782e4027..72704480d 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -705,13 +705,11 @@ path_conv::check (const char *src, unsigned opt,
if (component)
{
suff = NULL;
- sym.pflags = 0;
full_path = pathbuf;
}
else
{
suff = suffixes;
- sym.pflags = path_flags;
full_path = THIS_path;
}
@@ -818,6 +816,13 @@ path_conv::check (const char *src, unsigned opt,
full_path[3] = '\0';
}
+ /* If the incoming path was given in DOS notation, always treat
+ it as caseinsensitive,noacl path. This must be set before
+ calling sym.check, otherwise the path is potentially treated
+ casesensitive. */
+ if (is_msdos)
+ sym.pflags |= PATH_NOPOSIX | PATH_NOACL;
+
symlen = sym.check (full_path, suff, opt, fs);
is_virtual_symlink:
@@ -856,10 +861,6 @@ is_virtual_symlink:
don't handle path casesensitive. */
if (cygwin_shared->obcaseinsensitive || fs.caseinsensitive ())
path_flags |= PATH_NOPOSIX;
- /* If the incoming path was given in DOS notation, always treat
- it as caseinsensitive,noacl path. */
- else if (is_msdos)
- path_flags |= PATH_NOPOSIX | PATH_NOACL;
caseinsensitive = (path_flags & PATH_NOPOSIX)
? OBJ_CASE_INSENSITIVE : 0;
}