summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index aaf192820..3d07ea176 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1406,7 +1406,12 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
/* Ignore "./". */
else if (src[0] == '.' && isdirsep (src[1])
&& (src == src_start || isdirsep (src[-1])))
- src += 2;
+ {
+ src += 2;
+ /* Skip /'s to the next path component. */
+ while (isdirsep (*src))
+ src++;
+ }
/* Backup if "..". */
else if (src[0] == '.' && src[1] == '.'