Skip to content
Snippets Groups Projects
Commit bad0227d authored by Jonathon Reinhart's avatar Jonathon Reinhart Committed by Michael Roth
Browse files

qga: Support Unicode paths in guest-file-open on win32


Currently, the win32 port of QEMU Guest Agent does not properly handle Unicode
paths. The JSON decoder produces a valid UTF-8 path string, but this is passed
directly to CreateFileA, which is expecting an ANSI string and not UTF-8. This
leads to mangled filenames.

This patch follows the example of qmp_guest_set_user_password() and uses
g_utf8_to_utf16() to convert the string to UTF-16 and calls CreateFileW()
explicitly.

Signed-off-by: default avatarJonathon Reinhart <jreinhart@cc-sw.com>
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent a2e002ff
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment