aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/mingw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/mingw.c b/win32/mingw.c
index 6842dba48..7a5198ccf 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -2189,6 +2189,11 @@ void FAST_FUNC strip_dot_space(char *p)
2189 while (end > start && (end[-1] == '.' || end[-1] == ' ')) { 2189 while (end > start && (end[-1] == '.' || end[-1] == ' ')) {
2190 *--end = '\0'; 2190 *--end = '\0';
2191 } 2191 }
2192
2193 // Strip trailing slash, but not from a drive root (C:/)
2194 if (--end != start && (*end == '/' || *end == '\\') &&
2195 !(end == p + 2 && root_len(p) == 2))
2196 *end = '\0';
2192} 2197}
2193 2198
2194size_t FAST_FUNC remove_cr(char *p, size_t len) 2199size_t FAST_FUNC remove_cr(char *p, size_t len)