emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/fileio.c,v [EMACS_22_BASE]


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c,v [EMACS_22_BASE]
Date: Sat, 02 Aug 2008 09:29:29 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Eli Zaretskii <eliz>    08/08/02 09:29:29

Index: fileio.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fileio.c,v
retrieving revision 1.580.2.14
retrieving revision 1.580.2.15
diff -u -b -r1.580.2.14 -r1.580.2.15
--- fileio.c    10 Apr 2008 20:46:42 -0000      1.580.2.14
+++ fileio.c    2 Aug 2008 09:29:28 -0000       1.580.2.15
@@ -1066,6 +1066,7 @@
   int length;
   Lisp_Object handler, result;
   int multibyte;
+  Lisp_Object hdir;
 
   CHECK_STRING (name);
 
@@ -1369,9 +1370,19 @@
 #endif /* VMS */
          || nm[1] == 0)        /* ~ by itself */
        {
+         Lisp_Object tem;
+
          if (!(newdir = (unsigned char *) egetenv ("HOME")))
            newdir = (unsigned char *) "";
          nm++;
+         /* egetenv may return a unibyte string, which will bite us since
+            we expect the directory to be multibyte.  */
+         tem = build_string (newdir);
+         if (!STRING_MULTIBYTE (tem))
+           {
+             hdir = DECODE_FILE (tem);
+             newdir = SDATA (hdir);
+           }
 #ifdef DOS_NT
          collapse_newdir = 0;
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]