]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixed $HOME in expand-file-name.
authorEli Zaretskii <eliz@gnu.org>
Sat, 7 Dec 2013 14:59:37 +0000 (16:59 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 7 Dec 2013 14:59:37 +0000 (16:59 +0200)
src/fileio.c

index 476d77f8244e6069d6cc2969bcd03cb94164d1d9..e5347ce765ad48b9eefd4d41cab59ccafb31aacf 100644 (file)
@@ -1164,7 +1164,18 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
          nm++;
          /* `egetenv' may return a unibyte string, which will bite us since
             we expect the directory to be multibyte.  */
-         tem = build_string (newdir);
+#ifdef WINDOWSNT
+         if (newdir[0])
+           {
+             char newdir_utf8[MAX_UTF8_PATH];
+
+             filename_from_ansi (newdir, newdir_utf8);
+             tem = build_string (newdir_utf8);
+           }
+         else
+#else
+           tem = build_string (newdir);
+#endif
          if (multibyte && !STRING_MULTIBYTE (tem))
            {
              hdir = DECODE_FILE (tem);