]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/osdep/windows/hostdisk.c (canonicalize_file_name): Handle
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 11:34:03 +0000 (13:34 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 11:34:03 +0000 (13:34 +0200)
unicode path.

ChangeLog
grub-core/osdep/windows/hostdisk.c

index 944dcce8a2b413dd85a955f926b3b62c90dd906e..49e5784d9394a5a91d33c867a01bb89b84ffada0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/osdep/windows/hostdisk.c (canonicalize_file_name): Handle
+       unicode path.
+
 2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/tests/checksums.h: Regenerate due to swiss.sed change.
index 3e91d7d97b0fd656390024e431f6ba973a09b7e3..06f25aac267edd8e5584e04501aaa9cdd06e72b9 100644 (file)
@@ -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;
 }