OSDN Git Service

* path.cc (path_conv::check): Avoid splitting off leading '/' in path component
authorcgf <cgf>
Wed, 29 Aug 2001 04:43:19 +0000 (04:43 +0000)
committercgf <cgf>
Wed, 29 Aug 2001 04:43:19 +0000 (04:43 +0000)
when building a symlink.

winsup/cygwin/ChangeLog
winsup/cygwin/path.cc

index 5f98dc1..5afe460 100644 (file)
@@ -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.
index 65c0952..25d2174 100644 (file)
@@ -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;