Propagate correct Windows error if executable can't be opened
* spawn.cc (av::setup): Set last Win32 error if NtOpenFile fails. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
aa2d448093
commit
4c9bb3e0f9
|
@ -1085,6 +1085,7 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
|
|||
real_path.set_cygexec (true);
|
||||
break;
|
||||
}
|
||||
SetLastError (RtlNtStatusToDosError (status));
|
||||
goto err;
|
||||
}
|
||||
if (!GetFileSizeEx (h, &size))
|
||||
|
|
Loading…
Reference in New Issue