aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-06-24 09:15:05 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-06-24 09:15:05 +0000
commit677ded600cd382e406ecc6307c5477ad27473f1d (patch)
tree180a55b341ef8793ca86a021d5e6760130415ce9
parent3b12a57cb6575f24443931871ed169c54a802df5 (diff)
downloadnewlib-677ded600cd382e406ecc6307c5477ad27473f1d.zip
newlib-677ded600cd382e406ecc6307c5477ad27473f1d.tar.gz
newlib-677ded600cd382e406ecc6307c5477ad27473f1d.tar.bz2
* path.cc (path_conv::check): Don't strip trailing dots and spaces
at the start of the path.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b677111..92ddce3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2005-06-24 Corinna Vinschen <corinna@vinschen.de>
+ * path.cc (path_conv::check): Don't strip trailing dots and spaces
+ at the start of the path.
+
+2005-06-24 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler.cc (rootdir): Don't set errno.
* syscalls.cc (statvfs): Set errno to ENOTDIR if rootdir() failed.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 1e315e4..ca955cb 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -928,7 +928,7 @@ out:
else if (!tail)
tail = p;
- if (!tail)
+ if (!tail || tail == path)
/* nothing */;
else if (tail[-1] != '\\')
{