diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-11-17 18:39:47 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-11-17 18:39:47 +0000 |
commit | 46ba13261b212cb9d7b268f793494de9ad897ae4 (patch) | |
tree | 44ce63ad246659bace2c7e135e0f153ec038f33a /winsup/cygwin/path.cc | |
parent | 2ef98494d833484063780f010b1e05169d825d80 (diff) | |
download | newlib-46ba13261b212cb9d7b268f793494de9ad897ae4.zip newlib-46ba13261b212cb9d7b268f793494de9ad897ae4.tar.gz newlib-46ba13261b212cb9d7b268f793494de9ad897ae4.tar.bz2 |
* path.cc (normalize_posix_path): Special care for root directory
in case of files beginning with a dot.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index b878920..a0f4ebd 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -609,7 +609,11 @@ normalize_posix_path (const char *src, char *dst) } dst = strchr (dst, '\0'); if (*src == '.') - goto sawdot; + { + if (dst == dst_start + 1 && *dst_start == '/') + --dst; + goto sawdot; + } if (dst > dst_start && !isslash (dst[-1])) *dst++ = '/'; } |