Skip to content

Commit

Permalink
win,spawn: allow UNC path with forward slash
Browse files Browse the repository at this point in the history
Fixes: libuv#3159
PR-URL: libuv#3167
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
  • Loading branch information
earnal committed Sep 8, 2021
1 parent 66a3053 commit 7024f8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/win/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ static WCHAR* search_path_join_test(const WCHAR* dir,
size_t cwd_len) {
WCHAR *result, *result_pos;
DWORD attrs;
if (dir_len > 2 && dir[0] == L'\\' && dir[1] == L'\\') {
if (dir_len > 2 &&
((dir[0] == L'\\' || dir[0] == L'/') &&
(dir[1] == L'\\' || dir[1] == L'/'))) {
/* It's a UNC path so ignore cwd */
cwd_len = 0;
} else if (dir_len >= 1 && (dir[0] == L'/' || dir[0] == L'\\')) {
Expand Down

0 comments on commit 7024f8b

Please sign in to comment.