From 9e0ea97b831fa473b2ce8d33cfb2a70bc818c39d Mon Sep 17 00:00:00 2001 From: Evgeny Kotkov Date: Wed, 12 Apr 2023 12:51:03 +0000 Subject: Revert r1808456 (Win32: Don't seek to the end when opening files with APR_FOPEN_APPEND). While this change fixed an issue where Windows and Unix reported different offsets after opening files for append, it also caused a regression: for files opened with APR_FOPEN_APPEND | APR_FOPEN_BUFFERED, flushing their contents would cause the contents to be written at offset 0, rather than appended. This happens because flushes and regular writes use different code paths. And while regular writes guarantee that an append will happen to the end of the file, a buffer flush uses a regular WriteFile(), assuming the file pointer has been properly set before. To fix both issues, we'd probably need to rework this part and make all writes use the same approach. But for now let's revert this change to fix the regression, that was also reported in [1]. I'll add a regression test for this problem separately. [1] https://lists.apache.org/thread/56gnyc3tc0orjh5mfsqo9gpq1br59b01 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909088 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 --- 1 file changed, 3 deletions(-) (limited to 'CHANGES') diff --git a/CHANGES b/CHANGES index d452e6c9f..41b68d0cd 100644 --- a/CHANGES +++ b/CHANGES @@ -123,9 +123,6 @@ Changes for APR 2.0.0 *) apr_sockaddr_ip_getbuf, apr_sockaddr_ip_get: Append "%zone" for IPv6 link-local addresses. [Joe Orton] - *) Don't seek to the end when opening files with APR_FOPEN_APPEND on Windows. - [Evgeny Kotkov ] - *) Fix a deadlock when writing to locked files opened with APR_FOPEN_APPEND on Windows. PR 50058. [Evgeny Kotkov ] -- cgit v1.2.1