Commit 565f0b98 authored by Eli Zaretskii's avatar Eli Zaretskii

(Fexpand_file_name): Copy argument `name' into local storage on all platforms,

not just on DOS_NT.
parent fa79be7e
2008-08-29 Eli Zaretskii <eliz@gnu.org>
* fileio.c (Fexpand_file_name): Copy argument `name' into local
storage on all platforms, not just on DOS_NT.
2008-08-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* mac.c (mac_system_script_code): Use EMACS_INT for DEFVAR_INT variable.
......@@ -1149,11 +1149,10 @@ See also the function `substitute-in-file-name'. */)
nm = SDATA (name);
multibyte = STRING_MULTIBYTE (name);
#ifdef DOS_NT
/* We will force directory separators to be either all \ or /, so make
a local copy to modify, even if there ends up being no change. */
/* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */
nm = strcpy (alloca (strlen (nm) + 1), nm);
#ifdef DOS_NT
/* Note if special escape prefix is present, but remove for now. */
if (nm[0] == '/' && nm[1] == ':')
{
......@@ -1340,7 +1339,7 @@ See also the function `substitute-in-file-name'. */)
}
return name;
#else /* not DOS_NT */
if (nm == SDATA (name))
if (strcmp (nm, SDATA (name)) == 0)
return name;
return make_specified_string (nm, -1, strlen (nm), multibyte);
#endif /* not DOS_NT */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment