Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-11-26 14:12:52 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-11-26 14:12:52 +0300
commit2f4fef955c0e6bb32e0d6c9514fe612171484839 (patch)
tree9cd18cb303961e06b2aeedc6ae5d1f7b04cf8961 /winsup
parent6de53a35169a9973cdd9c3f2bb2e094ede7c5e97 (diff)
Fix creating relative native symlinks in top-level directories
* path.cc (symlink_native): Fix index when looking for colon in path. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/path.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 689411da8..0183d82c3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2015-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_native): Fix index when looking for colon in path.
+
2015-11-21 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (setlocaleinfo): New macro calling __setlocaleinfo.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 0c0a21187..ce17c0802 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1668,7 +1668,7 @@ symlink_native (const char *oldpath, path_conv &win32_newpath)
prefix strings. We start counting behind the \\?\ for speed. */
int num = cnt_bs (win32_oldpath.get_nt_native_path ()->Buffer + 4, c_old);
if (num < 1 /* locale drive. */
- || (win32_oldpath.get_nt_native_path ()->Buffer[6] != L':'
+ || (win32_oldpath.get_nt_native_path ()->Buffer[5] != L':'
&& num < 3)) /* UNC path. */
{
/* 3a. No valid common path prefix: Create absolute symlink. */