|
@@ -1802,12 +1802,18 @@ static void
|
|
convert_delimiter(char *path, char delim)
|
|
convert_delimiter(char *path, char delim)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
|
|
+ char old_delim;
|
|
|
|
|
|
if (path == NULL)
|
|
if (path == NULL)
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ if (delim == '/')
|
|
|
|
+ old_delim = '\\';
|
|
|
|
+ else
|
|
|
|
+ old_delim = '/';
|
|
|
|
+
|
|
for (i = 0; path[i] != '\0'; i++) {
|
|
for (i = 0; path[i] != '\0'; i++) {
|
|
- if ((path[i] == '/') || (path[i] == '\\'))
|
|
|
|
|
|
+ if (path[i] == old_delim)
|
|
path[i] = delim;
|
|
path[i] = delim;
|
|
}
|
|
}
|
|
}
|
|
}
|