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.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 1688f086e..5e00f3541 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -209,6 +209,12 @@ normalize_posix_path (const char *src, char *dst)
*dst++ = '/';
src = src_start + 1;
}
+ else if (src[0] == '.' && isslash (src[1]))
+ {
+ *dst++ = '.';
+ *dst++ = '/';
+ src += 2;
+ }
}
else
*dst = '\0';
@@ -934,7 +940,13 @@ normalize_win32_path (const char *src, char *dst)
if (beg_src_slash && isdirsep (src[1]))
{
*dst++ = '\\';
- ++src;
+ src++;
+ if (src[1] == '.' && isdirsep (src[2]))
+ {
+ *dst++ = '\\';
+ *dst++ = '.';
+ src += 2;
+ }
}
else if (strchr (src, ':') == NULL && *src != '/')
{