mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* path.cc (symlink_native): Fix common prefix search. Enhance comment.
This commit is contained in:
parent
a18c8c3688
commit
7556523159
@ -1,3 +1,7 @@
|
||||
2013-07-15 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (symlink_native): Fix common prefix search. Enhance comment.
|
||||
|
||||
2013-07-11 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* uname.cc (uname): Drop unused code.
|
||||
|
@ -1570,11 +1570,12 @@ symlink_native (const char *oldpath, path_conv &win32_newpath)
|
||||
|
||||
/* Try hard to keep Windows symlink path relative. */
|
||||
|
||||
/* 1. Find common path prefix. */
|
||||
PWCHAR c_old = win32_oldpath.get_nt_native_path ()->Buffer;
|
||||
PWCHAR c_new = win32_newpath.get_nt_native_path ()->Buffer;
|
||||
/* Windows compatible == always check case insensitive. */
|
||||
while (towupper (*c_old++) == towupper (*c_new++))
|
||||
/* 1. Find common path prefix. Skip leading \\?\, but take pre-increment
|
||||
of the following loop into account. */
|
||||
PWCHAR c_old = win32_oldpath.get_nt_native_path ()->Buffer + 3;
|
||||
PWCHAR c_new = win32_newpath.get_nt_native_path ()->Buffer + 3;
|
||||
/* Windows compatible == always check case insensitive. */
|
||||
while (towupper (*++c_old) == towupper (*++c_new))
|
||||
;
|
||||
/* The last component could share a common prefix, so make sure we end
|
||||
up on the first char after the last common backslash. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user