]> git.ipfire.org Git - thirdparty/make.git/commitdiff
[SV 63638] Fix processing PATH on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Wed, 11 Jan 2023 13:44:56 +0000 (15:44 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 11 Jan 2023 13:44:56 +0000 (15:44 +0200)
* src/variable.c (sync_Path_environment): Pass only the value of
PATH to convert_Path_to_windows32, excluding the "PATH=" part.

src/variable.c

index 7b625aee5d986f38f481ffbfed4ce8a3457b77ba..259093f80f9621e52ddb9b2b956ef6e0710bdffe 100644 (file)
@@ -2005,8 +2005,10 @@ sync_Path_environment ()
   if (!path)
     return;
 
-  /* Convert PATH into something WINDOWS32 world can grok.  */
-  convert_Path_to_windows32 (path, ';');
+  /* Convert the value of PATH into something WINDOWS32 world can grok.
+    Note: convert_Path_to_windows32 must see only the value of PATH,
+    and see it from its first character, to do its tricky job.  */
+  convert_Path_to_windows32 (path + CSTRLEN ("PATH="), ';');
 
   environ_path = path;
   putenv (environ_path);