bnicholes 2003/04/03 07:27:38
Modified: file_io/netware filestat.c
Log:
Call apr_file_flush() on a buffered file before getting the file info.
Submitted by: Blair Zajac <[EMAIL PROTECTED]>
Revision Changes Path
1.27 +6 -0 apr/file_io/netware/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/netware/filestat.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- filestat.c 7 Feb 2003 18:02:03 -0000 1.26
+++ filestat.c 3 Apr 2003 15:27:38 -0000 1.27
@@ -115,6 +115,12 @@
{
struct stat info;
+ if (thefile->buffered) {
+ apr_status_t rv = apr_file_flush(thefile);
+ if (rv != APR_SUCCESS)
+ return rv;
+ }
+
if (fstat(thefile->filedes, &info) == 0) {
finfo->pool = thefile->pool;
finfo->fname = thefile->fname;