diff options
author | Joe Orton <jorton@apache.org> | 2005-10-19 16:05:19 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2005-10-19 16:05:19 +0000 |
commit | df3c58a27c166b21a8d5f5667fa8807d878edaa5 (patch) | |
tree | 760f858fda08cda5aaff3cb093c64bd3c9ce761f /file_io | |
parent | 149c903e5f897f9285428306668041311494f1a9 (diff) | |
download | apr-df3c58a27c166b21a8d5f5667fa8807d878edaa5.tar.gz |
* file_io/unix/seek.c (setptr): Don't ignore errors from
apr_file_flush.
* test/testfile.c (test_fail_read_flush): Add test.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@326593 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/unix/seek.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/file_io/unix/seek.c b/file_io/unix/seek.c index 48368cda5..656947af6 100644 --- a/file_io/unix/seek.c +++ b/file_io/unix/seek.c @@ -22,7 +22,10 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos ) int rc; if (thefile->direction == 1) { - apr_file_flush(thefile); + rc = apr_file_flush(thefile); + if (rc) { + return rc; + } thefile->bufpos = thefile->direction = thefile->dataRead = 0; } |