aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-12-23 15:26:38 +0000
committerChristopher Faylor <me@cgf.cx>2004-12-23 15:26:38 +0000
commitaad93aea3e7ee34c9fee6cfc4b7e92a9865a0664 (patch)
tree5f395ebd00901e465dc7165db819ccce71e2d382 /winsup
parent4ee52924a61bdb2fd8ce7b64d111cf7df4d19fe3 (diff)
downloadnewlib-aad93aea3e7ee34c9fee6cfc4b7e92a9865a0664.zip
newlib-aad93aea3e7ee34c9fee6cfc4b7e92a9865a0664.tar.gz
newlib-aad93aea3e7ee34c9fee6cfc4b7e92a9865a0664.tar.bz2
* path.cc (path_conv::check): Don't strip the trailing slash from a path
consisting only of two slashes.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/path.cc2
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 286cab2..25e0ef9 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 4cb628f..0345f81 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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';