From 84a76fba699e860b23689977fdad469c215f398a Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Thu, 9 Feb 2012 22:53:56 +0000 Subject: [PATCH] Remove repeating backslashes only on Windows --- mongoose.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 7e80fe27..17ef4174 100644 --- a/mongoose.c +++ b/mongoose.c @@ -1696,9 +1696,9 @@ static void remove_double_dots_and_double_slashes(char *s) { while (*s != '\0') { *p++ = *s++; - if (s[-1] == '/' || s[-1] == '\\') { + if (s[-1] == '/' || s[-1] == DIRSEP) { // Skip all following slashes and backslashes - while (*s == '/' || *s == '\\') { + while (*s == '/' || *s == DIRSEP) { s++; }