Fix slashes while expanding path tokens
On Windows, some (external) APIs get confused if we mix both back and forward slashes. When expanding path tokens we use back-slashes for token expansions because they come from the OS. For consistency, fix the path so that the remaining path separators are also backslashes.
This commit is contained in:
@@ -479,6 +479,14 @@ _krb5_expand_path_tokens(krb5_context context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Also deal with slashes */
|
||||||
|
if (*ppath_out) {
|
||||||
|
char * c;
|
||||||
|
for (c = *ppath_out; *c; c++)
|
||||||
|
if (*c == '/')
|
||||||
|
*c = '\\';
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user