diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e5fbc9e9d..abaf716be 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2010-05-06 Corinna Vinschen + + * path.cc (path_conv::check): Drop setting sym.pflags before calling + mount_info::conv_to_win32_path since the flag value is overwritten by + mount_info::conv_to_win32_path anyway. + Set flags for DOS paths before calling symlink_info::check so they can + be used in that function already. + 2010-05-03 Christopher Faylor * dll_init.cc (dll_list::alloc): Add debugging assertion. 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; }