From db64ab89f0f0ded360c8f0975a96666281060b35 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 20 Apr 2000 20:42:14 +0000 Subject: [PATCH] * path.cc (normalize_posix_path): Previous change failed to take root access into account. --- winsup/cygwin/ChangeLog | 7 ++++++- winsup/cygwin/path.cc | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1f0b29d00..6d0801ce1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,6 +1,11 @@ +Thu Apr 20 16:39:18 2000 Christopher Faylor + + * path.cc (normalize_posix_path): Previous change failed to take root + access into account. + Thu Apr 20 11:26:00 2000 Corinna Vinschen - * syscalls.cc (_link): Check new link path for trailing dot. + * syscalls.cc (_link): Check new link path for trailing dot. Thu Apr 20 00:32:03 2000 Christopher Faylor diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index fd4973f12..9b9d37e06 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -620,7 +620,7 @@ normalize_posix_path (const char *cwd, const char *src, char *dst) } } if (dst > (dst_start + 1) && dst[-1] == '.' && SLASH_P (dst[-2])) - dst -= 2; + dst -= dst[2] ? 2 : 1; *dst = 0; debug_printf ("%s = normalize_posix_path (%s)", dst_start, src_start); return 0;