Transform all special chars in relative Windows path string
get_nt_native_path handles the transposition of chars not allowed in Windows pathnames. However, it never starts transposition at the start of the string, which is wrong for relative paths. Fix it. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -447,11 +447,14 @@ get_nt_native_path (const char *path, UNICODE_STRING& upath, bool dos)
|
||||
str2uni_cat (upath, path);
|
||||
/* The drive letter must be upper case. */
|
||||
upath.Buffer[4] = towupper (upath.Buffer[4]);
|
||||
}
|
||||
else
|
||||
str2uni_cat (upath, path);
|
||||
transform_chars (&upath, 7);
|
||||
}
|
||||
else /* relative path */
|
||||
{
|
||||
str2uni_cat (upath, path);
|
||||
transform_chars (&upath, 0);
|
||||
}
|
||||
}
|
||||
else if (path[1] != '\\') /* \Device\... */
|
||||
str2uni_cat (upath, path);
|
||||
else if ((path[2] != '.' && path[2] != '?')
|
||||
|
Reference in New Issue
Block a user