From 2859196e5f16618524bf79c371f59b2f146633e3 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 15 Oct 2013 13:34:03 +0200 Subject: [PATCH] * grub-core/osdep/windows/hostdisk.c (canonicalize_file_name): Handle unicode path. --- ChangeLog | 5 +++++ grub-core/osdep/windows/hostdisk.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 944dcce8a..49e5784d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-15 Vladimir Serbinenko + + * grub-core/osdep/windows/hostdisk.c (canonicalize_file_name): Handle + unicode path. + 2013-10-15 Vladimir Serbinenko * grub-core/tests/checksums.h: Regenerate due to swiss.sed change. diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c index 3e91d7d97..06f25aac2 100644 --- a/grub-core/osdep/windows/hostdisk.c +++ b/grub-core/osdep/windows/hostdisk.c @@ -279,15 +279,15 @@ char * canonicalize_file_name (const char *path) { char *ret; + LPTSTR windows_path; ret = xmalloc (PATH_MAX); -#ifndef __CYGWIN__ - if (!_fullpath (ret, path, PATH_MAX)) + windows_path = grub_util_get_windows_path (path); + if (!windows_path) return NULL; -#else - if (!realpath (path, ret)) - return NULL; -#endif + ret = grub_util_tchar_to_utf8 (windows_path); + free (windows_path); + return ret; }