From 6a30e6d6d335d0f2d726a94a9e982a20bfeace73 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 1 Jul 1997 06:32:13 +0000 Subject: [PATCH] (decode_env_path): Ensure path elements use proper directory separator. --- src/emacs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) { -- 2.39.2