From aad93aea3e7ee34c9fee6cfc4b7e92a9865a0664 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 23 Dec 2004 15:26:38 +0000 Subject: [PATCH] * path.cc (path_conv::check): Don't strip the trailing slash from a path consisting only of two slashes. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/path.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 286cab229..25e0ef947 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2004-12-23 Christopher Faylor + Corinna Vinschen + + * path.cc (path_conv::check): Don't strip the trailing slash from a + path consisting only of two slashes. + 2004-12-23 Christopher Faylor * cygthread.cc (cygthread::stub): Detect if thread function wants to diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 4cb628f9e..0345f8191 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';