浏览代码

libuv: Revert "win/spawn: run executables with no file extension"

This reverts commit fc6231bee5 (libuv: win/spawn: run executables with
no file extension, 2023-12-04, v3.28.0~9^2) to make room for the
corresponding fix from upstream libuv 1.48.

Record this as a merge from the last-imported upstream libuv snapshot
branch so that future `git blame` points to the upstream for the
original code instead of this commit.

Issue: #25450
Brad King 1 年之前
父节点
当前提交
f02ac51150
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      Utilities/cmlibuv/src/win/process.c

+ 2 - 6
Utilities/cmlibuv/src/win/process.c

@@ -329,8 +329,6 @@ static WCHAR* path_search_walk_ext(const WCHAR *dir,
  * - If there's really only a filename, check the current directory for file,
  *   then search all path directories.
  *
- * - If a full path is specified, search for the exact filename first.
- *
  * - If filename specified has *any* extension, search for the file with the
  *   specified extension first.
  *
@@ -394,14 +392,12 @@ static WCHAR* search_path(const WCHAR *file,
   name_has_ext = (dot != NULL && dot[1] != L'\0');
 
   if (file_has_dir) {
-    /* The file has a path inside, don't use path
-     * Try the exact filename first, and then try standard extensions
-     */
+    /* The file has a path inside, don't use path */
     result = path_search_walk_ext(
         file, file_name_start - file,
         file_name_start, file_len - (file_name_start - file),
         cwd, cwd_len,
-        1);
+        name_has_ext);
 
   } else {
     dir_end = path;