# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 867738733 0
# Node ID 38e3a189ed1dc7f2caeb0f30f56cd30d7ae90cf8
# Parent  948557b5aa7c4edf44778fb6cec3da85a7971b72
(decode_env_path): Ensure path elements use proper directory separator.

diff -r 948557b5aa7c -r 38e3a189ed1d src/emacs.c
--- a/src/emacs.c	Tue Jul 01 06:30:13 1997 +0000
+++ b/src/emacs.c	Tue Jul 01 06:32:13 1997 +0000
@@ -1576,6 +1576,20 @@
     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)
     {