diff options
author | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2006-01-30 06:48:56 +0000 |
---|---|---|
committer | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2006-01-30 06:48:56 +0000 |
commit | 5d9ca14434e4a3bad483b78e27e35148659c09f3 (patch) | |
tree | 04f46793b4711ce3b99a6c0e1939792f6afaed1b /file_io/win32/seek.c | |
parent | 4dcd5d73a7d7526627b9026610ce3b6b2daccb82 (diff) | |
download | libapr-5d9ca14434e4a3bad483b78e27e35148659c09f3.tar.gz |
Fix bug #38438, seeks are broken for files opened for append in xthread
mode on win32.
Submitted by: M Joonas Pihlaja <jpihlaja cc.helsinki.fi>
Test by: Garrett Rooney
* file_io/win32/seek.c
(apr_file_seek): Fix APR_END case of APR_XTHREAD case.
* test/testfile.c
(test_xthread): New test.
(testfile): Run new test.
* CHANGES: Note change.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@373453 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/win32/seek.c')
-rw-r--r-- | file_io/win32/seek.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/file_io/win32/seek.c b/file_io/win32/seek.c index be5bac932..03cee4ed1 100644 --- a/file_io/win32/seek.c +++ b/file_io/win32/seek.c @@ -105,8 +105,8 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh case APR_END: rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile); - if (rc == APR_SUCCESS && finfo.size - *offset < 0) - thefile->filePtr = finfo.size - *offset; + if (rc == APR_SUCCESS && finfo.size + *offset >= 0) + thefile->filePtr = finfo.size + *offset; break; default: |