aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-08-29 04:43:19 +0000
committerChristopher Faylor <me@cgf.cx>2001-08-29 04:43:19 +0000
commit41d53c9845c5eb4c8b8d43e0f93d4f5f5114f6cf (patch)
tree2d07720f3bd8c11790c0b491241d4f07d512f4a3 /winsup
parente4a17c6d11f4ea7cafe5c29daca3219d874d1f61 (diff)
downloadnewlib-41d53c9845c5eb4c8b8d43e0f93d4f5f5114f6cf.zip
newlib-41d53c9845c5eb4c8b8d43e0f93d4f5f5114f6cf.tar.gz
newlib-41d53c9845c5eb4c8b8d43e0f93d4f5f5114f6cf.tar.bz2
* path.cc (path_conv::check): Avoid splitting off leading '/' in path component
when building a symlink.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc2
2 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5f98dc1..5afe460 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 29 00:40:42 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * path.cc (path_conv::check): Avoid splitting off leading '/' in path
+ component when building a symlink.
+
Wed Aug 29 0:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
* resource.cc (getrlimit): Return actual values on RLIMIT_STACK.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 65c0952..25d2174 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -615,6 +615,8 @@ path_conv::check (const char *src, unsigned opt,
to the symbolic link. */
if ((p = strrchr (path_copy, '/')) == NULL)
p = path_copy;
+ else if (p == path_copy)
+ p++;
*p = '\0';
char *headptr;