summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 318986a7e..b759d611c 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -282,7 +282,14 @@ normalize_posix_path (const char *src, char *dst)
else if (src[2] && !isslash (src[2]))
{
if (src[2] == '.')
- return ENOENT;
+ {
+ /* Is this a run of dots? That would be an invalid
+ filename. A bunch of leading dots would be ok,
+ though. */
+ int n = strspn (src, ".");
+ if (!src[n] || isslash (src[n])) /* just dots... */
+ return ENOENT;
+ }
break;
}
else