diff options
author | Christopher Faylor <me@cgf.cx> | 2000-09-12 22:41:36 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-09-12 22:41:36 +0400 |
commit | 67826e2264c4b3218e0cb5ca1bff681efd0dba66 (patch) | |
tree | 8041e2253164140892c140cf8125924d59d3d23f /winsup | |
parent | 5c8663ed32ec02c4e3d5ed5833ffc7173df96108 (diff) |
* path.cc (normalize_posix_path): Fix more slashdot madness.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b71647389..b83ca47cf 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Tue Sep 12 14:37:32 2000 Christopher Faylor <cgf@cygnus.com> + + * path.cc (normalize_posix_path): Fix more slashdot madness. + Tue Sep 12 12:29:29 2000 Christopher Faylor <cgf@cygnus.com> * Makefile.in: Make clean target remove *.d. 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; } |