Bert Huijben <b...@qqmail.nl> writes: >> rv = WriteFile(thefile->filehand, buf, (DWORD)*nbytes, &bwrote, >> thefile->pOverlapped); >> + if (rv == APR_SUCCESS && thefile->pOverlapped) { >> + thefile->filePtr += *nbytes; >> + } > > The result of WriteFile should not be checked against APR_SUCCESS, as that > is not a documented Windows result code. The right constant evaluating to > 0 should be used.
Unfortunately, I think that I have missed how the return value of WriteFile() was being checked in the last part of apr_file_write(), and both the r1806592 and r1806603 changesets are wrong and change the behavior of the code. As these changesets were meant to be refactorings that make the code clearer, without altering its behavior, I think that they should be reverted for now. (I will prepare an alternative patch with these simplifications that doesn't change the behavior of the code.) Sorry for that, Evgeny Kotkov