Fix silly mistake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeff Cohen 2005-02-20 02:48:51 +00:00
parent 875d08e36b
commit 45a1b26caa

View File

@ -86,7 +86,7 @@ static HANDLE RedirectIO(const Path *path, int fd) {
sa.bInheritHandle = TRUE;
h = CreateFile(fname, fd ? GENERIC_WRITE : GENERIC_READ, FILE_SHARE_READ,
&sa, fd ? OPEN_EXISTING : CREATE_ALWAYS,
&sa, fd == 0 ? OPEN_EXISTING : CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE) {
ThrowError(std::string(fname) + ": Can't open file for " +