diff options
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 0290ed7a3..463fb6c4f 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++ = '/'; } |