From: Joe Orton Date: Thu, 11 Mar 2004 14:32:00 +0000 (+0000) Subject: * modules/dav/fs/repos.c (dav_fs_copymove_file): Update for the fact X-Git-Tag: pre_ajp_proxy~554 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af018fda001fdcbd43b5a602176067c84ab9aefa;p=apache * modules/dav/fs/repos.c (dav_fs_copymove_file): Update for the fact that apr_file_read() has guaranteed len == 0 at EOF for a looong time; and avoid a redundant call to write(,,0) when EOF is reached. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102934 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c index ba57c4d723..487fab6065 100644 --- a/modules/dav/fs/repos.c +++ b/modules/dav/fs/repos.c @@ -348,7 +348,10 @@ static dav_error * dav_fs_copymove_file( "Could not read input file"); } - /* write any bytes that were read (applies to APR_EOF, too) */ + if (status == APR_EOF) + break; + + /* write any bytes that were read */ if (apr_file_write_full(outf, pbuf->buf, len, NULL) != APR_SUCCESS) { int save_errno = errno; @@ -375,9 +378,6 @@ static dav_error * dav_fs_copymove_file( return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, "Could not write output file"); } - - if (status == APR_EOF) - break; } apr_file_close(inf);