diff options
Diffstat (limited to 'server/util.c')
-rw-r--r-- | server/util.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/util.c b/server/util.c index 3693bfbff1..89c5abef80 100644 --- a/server/util.c +++ b/server/util.c @@ -568,16 +568,16 @@ AP_DECLARE(void) ap_getparents(char *name) name[l] = '\0'; } } - -AP_DECLARE(void) ap_no2slash(char *name) +AP_DECLARE(void) ap_no2slash_ex(char *name, int is_fs_path) { + char *d, *s; s = d = name; #ifdef HAVE_UNC_PATHS /* Check for UNC names. Leave leading two slashes. */ - if (s[0] == '/' && s[1] == '/') + if (is_fs_path && s[0] == '/' && s[1] == '/') *d++ = *s++; #endif @@ -594,6 +594,10 @@ AP_DECLARE(void) ap_no2slash(char *name) *d = '\0'; } +AP_DECLARE(void) ap_no2slash(char *name) +{ + ap_no2slash_ex(name, 1); +} /* * copy at most n leading directories of s into d |