From c27a29813a634f283a405df1165f0010bb10eb74 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 7 Oct 2001 21:16:36 +0000 Subject: * path.cc (normalize_posix_path): Don't eat a '.' after a '\\' since it has special meaning on NT. * syscalls.cc (access): Use stat_worker. --- winsup/cygwin/path.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/path.cc') 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 != '/') { -- cgit v1.2.3