]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor fix in Windows-specific code in decode_env_path.
authorEli Zaretskii <eliz@gnu.org>
Sun, 15 Dec 2013 17:52:14 +0000 (19:52 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 15 Dec 2013 17:52:14 +0000 (19:52 +0200)
 src/emacs.c (decode_env_path): Fix bogus comparison against
 emacs_dir.  Reported by Juanma Barranquero <lekktu@gmail.com>.

src/ChangeLog
src/emacs.c

index 1b19a309c0402b22201f455cbd7f9838d5f0ac64..da3b78e0f25ad94cc405c4c97791ccbb509d07d2 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * emacs.c (decode_env_path): Fix bogus comparison against
+       emacs_dir.  Reported by Juanma Barranquero <lekktu@gmail.com>.
+
 2013-12-15  Juanma Barranquero  <lekktu@gmail.com>
 
        * w32fns.c (Fw32_shell_execute): Remove unused local variable.
index 9c5a33d5a8913d4c6e395bef771ee05f8ce37877..2dfd12eff8b1682f82fa9d6158cc901541e02e93 100644 (file)
@@ -2224,7 +2224,8 @@ decode_env_path (const char *evarname, const char *defalt, bool empty)
   /* egetenv looks in process-environment, which holds the variables
      in their original system-locale encoding.  We need emacs_dir to
      be in UTF-8.  */
-  filename_from_ansi (edir, emacs_dir);
+  if (edir)
+    filename_from_ansi (edir, emacs_dir);
 #endif
 
   /* It's okay to use getenv here, because this function is only used
@@ -2299,7 +2300,7 @@ decode_env_path (const char *evarname, const char *defalt, bool empty)
 #ifdef WINDOWSNT
           /* Relative file names in the default path are interpreted as
              being relative to $emacs_dir.  */
-          if (emacs_dir && defaulted
+          if (edir && defaulted
               && strncmp (path, emacs_dir_env, emacs_dir_len) == 0)
             element = Fexpand_file_name (Fsubstring
                                          (element,