diff options
author | Christopher Faylor <me@cgf.cx> | 2000-04-21 14:37:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-04-21 14:37:48 +0000 |
commit | 7203adb1cc1170a7844a79af8d03e14c3fed6e21 (patch) | |
tree | f364efb8bd27ace3cfc0e571cd8ed9ea0353c34b | |
parent | 6b762a4ec6606e98d94b17f221342967e9703505 (diff) | |
download | newlib-7203adb1cc1170a7844a79af8d03e14c3fed6e21.zip newlib-7203adb1cc1170a7844a79af8d03e14c3fed6e21.tar.gz newlib-7203adb1cc1170a7844a79af8d03e14c3fed6e21.tar.bz2 |
Fix handling of /.filename
-rw-r--r-- | winsup/cygwin/ChangeLog | 2 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c573a34..12df069 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,4 +1,4 @@ -Fri Apr 21 01:27:47 2000 Christopher Faylor <cgf@cygnus.com> +Fri Apr 21 10:37:08 2000 Christopher Faylor <cgf@cygnus.com> * path.cc (normalize_posix_path): Previous two patches were still incorrect so rewrite this function to deal with trailing dots. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 0290ed7..463fb6c 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -561,7 +561,11 @@ normalize_posix_path (const char *cwd, const char *src, char *dst) strcpy (dst, cwd); dst = strchr (dst, '\0'); if (*src == '.') - goto sawdot; + { + if (dst == dst_start + 1) + dst--; + goto sawdot; + } if (dst > dst_start && !isslash (dst[-1])) *dst++ = '/'; } |