You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by br...@apache.org on 2003/03/07 20:21:29 UTC
cvs commit: apr/file_io/win32 filestat.c
brane 2003/03/07 11:21:29
Modified: file_io/win32 filestat.c
Log:
Fix the 'test_buffered_write_size' test by ensuring that buffered
files are flushed before calling fstat.
[Port of jorton's rev. 1.65 commit of apr/file_io/unix/filestat.c]
Revision Changes Path
1.78 +6 -0 apr/file_io/win32/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/filestat.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- filestat.c 7 Jan 2003 00:52:53 -0000 1.77
+++ filestat.c 7 Mar 2003 19:21:29 -0000 1.78
@@ -411,6 +411,12 @@
{
BY_HANDLE_FILE_INFORMATION FileInfo;
+ if (thefile->buffered) {
+ apr_status_t rv = apr_file_flush(thefile);
+ if (rv != APR_SUCCESS)
+ return rv;
+ }
+
if (!GetFileInformationByHandle(thefile->filehand, &FileInfo)) {
return apr_get_os_error();
}