Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/v1.x' into v1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Dec 9, 2023
2 parents 950dc75 + 5e30273 commit 7b4219f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/win/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,13 @@ static WCHAR* search_path(const WCHAR *file,
} else {
dir_end = path;

/* The file is really only a name; look in cwd first, then scan path */
result = path_search_walk_ext(L"", 0,
file, file_len,
cwd, cwd_len,
name_has_ext);
if (NeedCurrentDirectoryForExePathW(L"")) {
/* The file is really only a name; look in cwd first, then scan path */
result = path_search_walk_ext(L"", 0,
file, file_len,
cwd, cwd_len,
name_has_ext);
}

while (result == NULL) {
if (dir_end == NULL || *dir_end == L'\0') {
Expand Down

0 comments on commit 7b4219f

Please sign in to comment.