From da0895caa4caac61959f6b260d3b1d5df9983754 Mon Sep 17 00:00:00 2001 From: Munkyu Im Date: Wed, 15 Feb 2017 12:18:53 +0900 Subject: [PATCH] osutil: use system encoding on Windows For unicode or other encodings, set as system encoding when use CreateFile() Change-Id: I99399e4bdfb871efbebbd9665d5b04c8d24c8c51 Signed-off-by: Munkyu Im --- tizen/src/util/osutil-win32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tizen/src/util/osutil-win32.c b/tizen/src/util/osutil-win32.c index 48220da..6f4c65d 100644 --- a/tizen/src/util/osutil-win32.c +++ b/tizen/src/util/osutil-win32.c @@ -90,7 +90,6 @@ void make_vm_lock_os(gchar *vms_path) g_assert(lock_filename == NULL); lock_filename = g_strdup_printf("%s\\%s", vms_path, VMLOCK_FILE); - if (g_mkdir_with_parents(g_path_get_dirname(lock_filename), 0777)) { LOG_WARNING("Can not create directory for lock file: %ld\n", GetLastError()); @@ -99,7 +98,7 @@ void make_vm_lock_os(gchar *vms_path) lock_filename = NULL; return; } - lock_file = CreateFile(lock_filename, + lock_file = CreateFile(g_win32_locale_filename_from_utf8(lock_filename), GENERIC_READ | GENERIC_WRITE, 0, // No share NULL, @@ -207,7 +206,7 @@ bool make_sdcard_lock_os(char *sdcard) } fname = g_strdup_printf("%s.lck", sdcard); - h = CreateFile(fname, + h = CreateFile(g_win32_locale_filename_from_utf8(fname), GENERIC_READ, 0, // No share NULL, -- 2.7.4