diff options
author | Christopher Faylor <me@cgf.cx> | 2001-10-07 21:16:36 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-10-07 21:16:36 +0000 |
commit | c27a29813a634f283a405df1165f0010bb10eb74 (patch) | |
tree | e9014a4b71406b3b8b34101fcec0b8f9b7da7730 /winsup/cygwin/path.cc | |
parent | 58364ce8a1cbbcf5aafa5e8b41e77dd71bb64110 (diff) | |
download | cygnal-c27a29813a634f283a405df1165f0010bb10eb74.tar.gz cygnal-c27a29813a634f283a405df1165f0010bb10eb74.tar.bz2 cygnal-c27a29813a634f283a405df1165f0010bb10eb74.zip |
* path.cc (normalize_posix_path): Don't eat a '.' after a '\\' since it has
special meaning on NT.
* syscalls.cc (access): Use stat_worker.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 14 |
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 != '/') { |