summaryrefslogtreecommitdiff
path: root/file_io
diff options
context:
space:
mode:
Diffstat (limited to 'file_io')
-rw-r--r--file_io/os2/filestat.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/file_io/os2/filestat.c b/file_io/os2/filestat.c
index e32b2906c..cafdf4f1b 100644
--- a/file_io/os2/filestat.c
+++ b/file_io/os2/filestat.c
@@ -91,8 +91,17 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t want
ULONG rc;
FILESTATUS3 fstatus;
- if (thefile->isopen)
+ if (thefile->isopen) {
+ if (thefile->buffered) {
+ apr_status_t rv = apr_file_flush(thefile);
+
+ if (rv != APR_SUCCESS) {
+ return rv;
+ }
+ }
+
rc = DosQueryFileInfo(thefile->filedes, FIL_STANDARD, &fstatus, sizeof(fstatus));
+ }
else
rc = DosQueryPathInfo(thefile->fname, FIL_STANDARD, &fstatus, sizeof(fstatus));