From b9dc82e09e74918a91b4420e6f9034181aaf3050 Mon Sep 17 00:00:00 2001 From: Asanka Herath Date: Wed, 26 May 2010 10:23:03 -0400 Subject: [PATCH] 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. --- lib/krb5/expand_path_w32.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/krb5/expand_path_w32.c b/lib/krb5/expand_path_w32.c index 784ce64fe..0c4287c32 100644 --- a/lib/krb5/expand_path_w32.c +++ b/lib/krb5/expand_path_w32.c @@ -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; } -- 2.11.4.GIT