summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
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/cygwin/path.cc
parente4a17c6d11f4ea7cafe5c29daca3219d874d1f61 (diff)
downloadcygnal-41d53c9845c5eb4c8b8d43e0f93d4f5f5114f6cf.tar.gz
cygnal-41d53c9845c5eb4c8b8d43e0f93d4f5f5114f6cf.tar.bz2
cygnal-41d53c9845c5eb4c8b8d43e0f93d4f5f5114f6cf.zip
* path.cc (path_conv::check): Avoid splitting off leading '/' in path component
when building a symlink.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 65c09525a..25d2174bd 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;