From: Richard M. Stallman Date: Tue, 1 Jul 1997 06:32:13 +0000 (+0000) Subject: (decode_env_path): Ensure path elements use proper directory separator. X-Git-Tag: emacs-20.1~1432 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6a30e6d6d335d0f2d726a94a9e982a20bfeace73;p=emacs.git (decode_env_path): Ensure path elements use proper directory separator. --- diff --git a/src/emacs.c b/src/emacs.c index 31a2b6995e0..e29724a38d7 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1576,6 +1576,20 @@ decode_env_path (evarname, defalt) path = 0; if (!path) path = defalt; +#ifdef DOS_NT + /* Ensure values from the environment use the proper directory separator. */ + if (path) + { + p = alloca (strlen (path) + 1); + strcpy (p, path); + path = p; + + if ('/' == DIRECTORY_SEP) + dostounix_filename (path); + else + unixtodos_filename (path); + } +#endif lpath = Qnil; while (1) {