windows: uv_spawn shouldn't reject reparse points

This fixes an issue where uv_spawn would not try to run a reparse point,
and continue to scan the PATH instead. Effectively, it was impossible to
spawn a symlinked binary. This commit fixes that.

Also see #748

This is a backport of 495d1a0 to the v0.8 branch.
This commit is contained in:
Bert Belder 2013-06-19 00:14:58 +02:00
parent 1258d9e3ef
commit 399c3ef55c

View File

@ -166,7 +166,7 @@ static wchar_t* search_path_join_test(const wchar_t* dir,
attrs = GetFileAttributesW(result); attrs = GetFileAttributesW(result);
if (attrs != INVALID_FILE_ATTRIBUTES && if (attrs != INVALID_FILE_ATTRIBUTES &&
!(attrs & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT))) { !(attrs & FILE_ATTRIBUTE_DIRECTORY)) {
return result; return result;
} }