diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2021-04-21 17:32:06 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-04-21 17:41:08 +0200 |
commit | 13fd26ecf5ca8417146d57b45aed0133435c3497 (patch) | |
tree | ed66fe457882a376a05ded1f82491ce336597796 /winsup/cygwin/dcrt0.cc | |
parent | 282445a10ebda592a0bb0e947725e1205b8436d3 (diff) | |
download | newlib-13fd26ecf5ca8417146d57b45aed0133435c3497.zip newlib-13fd26ecf5ca8417146d57b45aed0133435c3497.tar.gz newlib-13fd26ecf5ca8417146d57b45aed0133435c3497.tar.bz2 |
Cygwin: skip native symlink check in Windows dir under WOW64
Commit 456c3a46386f added a workaround when handling paths with native
symlinks as inner path components. This patch introduced a problem for
paths handled by the WOW64 File System Redirector (FSR).
Fix this problem by not performing the new code from commit 456c3a46386f
for paths under the Windows directory. Only do this in WOW64.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index f153c73..3bbee4d 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -730,6 +730,12 @@ init_windows_system_directory () system_wow64_directory[system_wow64_directory_length++] = L'\\'; system_wow64_directory[system_wow64_directory_length] = L'\0'; } + /* We need the Windows dir in path.cc. */ + wcscpy (windows_directory, windows_system_directory); + windows_directory_length = windows_system_directory_length - 1; + windows_directory[windows_directory_length] = L'\0'; + while (windows_directory[windows_directory_length - 1] != L'\\') + windows_directory[--windows_directory_length] = L'\0'; #endif /* __i386__ */ } } |