diff options
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/path.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 807a7c6ef..83718385d 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1483,8 +1483,13 @@ normalize_win32_path (const char *src, char *dst, char *&tail) /* Always convert drive letter to uppercase for case sensitivity. */ if (isdirsep (src[2])) - /* Always convert drive letter to uppercase for case sensitivity. */ - *tail++ = cyg_toupper (*src++); + { + /* Always convert drive letter to uppercase for case sensitivity. */ + *tail++ = cyg_toupper (*src++); + *tail++ = *src++; + *tail++ = *src++; + dst = tail; + } else { /* Drive-relative path: get drive path from environment. */ @@ -1499,19 +1504,18 @@ normalize_win32_path (const char *src, char *dst, char *&tail) return ENAMETOOLONG; tail += len; + dst = tail; *tail++ = '\\'; src += 2; } else { *tail++ = cyg_toupper (*src++); + *tail++ = *src++; + dst = tail; + *tail++ = '\\'; } } - *tail++ = *src++; - dst = tail; - /* If backslash is missing in src, add one. */ - if (!isdirsep (src[0])) - *tail++ = '\\'; } else { |