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
This commit is contained in:
Brad King
2024-02-08 16:47:06 -05:00
+2 -6
View File
@@ -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;