From 67826e2264c4b3218e0cb5ca1bff681efd0dba66 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 12 Sep 2000 18:41:36 +0000 Subject: * path.cc (normalize_posix_path): Fix more slashdot madness. --- winsup/cygwin/path.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 54b879560..9f0856191 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -551,11 +551,7 @@ normalize_posix_path (const char *src, char *dst) strcpy (dst, cwd); dst = strchr (dst, '\0'); if (*src == '.') - { - if (dst == dst_start + 1) - dst--; - goto sawdot; - } + goto sawdot; if (dst > dst_start && !isslash (dst[-1])) *dst++ = '/'; } @@ -603,7 +599,11 @@ normalize_posix_path (const char *src, char *dst) if (src[1] != '.') { if (!src[1]) - goto done; + { + if (dst == dst_start) + *dst++ = '/'; + goto done; + } if (!isslash (src[1])) break; } -- cgit v1.2.3