Fix sanitary_path_copy() for absolute Windows style paths.

We recognized the drive letter and colon, but we did not copy them. So far
this was not a problem since the only call site used the same pointer for
source and destination. But better safe than sorry.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt
2008-02-24 17:35:39 +01:00
parent 7d9a058247
commit d4af30b7c7

View File

@@ -16,9 +16,9 @@ static int sanitary_path_copy(char *dst, const char *src)
#ifdef __MINGW32__
if (isalpha(*src) && src[1] == ':') {
src += 2;
dst += 2;
dst0 += 2;
*dst++ = *src++;
*dst++ = *src++;
dst0 = dst;
}
#endif
if (is_dir_sep(*src)) {