OSDN Git Service

* path.cc (path_conv::check): Don't strip the trailing slash from a path
authorcgf <cgf>
Thu, 23 Dec 2004 15:26:36 +0000 (15:26 +0000)
committercgf <cgf>
Thu, 23 Dec 2004 15:26:36 +0000 (15:26 +0000)
consisting only of two slashes.

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

index 286cab2..25e0ef9 100644 (file)
@@ -1,4 +1,10 @@
 2004-12-23  Christopher Faylor  <cgf@timesys.com>
+           Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (path_conv::check): Don't strip the trailing slash from a
+       path consisting only of two slashes.
+
+2004-12-23  Christopher Faylor  <cgf@timesys.com>
 
        * cygthread.cc (cygthread::stub): Detect if thread function wants to
        release itself here, to avoid a race.
index 4cb628f..0345f81 100644 (file)
@@ -542,7 +542,7 @@ path_conv::check (const char *src, unsigned opt,
       /* Detect if the user was looking for a directory.  We have to strip the
         trailing slash initially while trying to add extensions but take it
         into account during processing */
-      if (tail > path_copy + 1 && isslash (tail[-1]))
+      if (tail > path_copy + 2 && isslash (tail[-1]))
        {
          need_directory = 1;
          *--tail = '\0';