You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2004/03/11 15:32:00 UTC
cvs commit: httpd-2.0/modules/dav/fs repos.c
jorton 2004/03/11 06:32:00
Modified: modules/dav/fs repos.c
Log:
* 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.
Revision Changes Path
1.78 +4 -4 httpd-2.0/modules/dav/fs/repos.c
Index: repos.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/fs/repos.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -w -d -u -r1.77 -r1.78
--- repos.c 9 Feb 2004 20:29:18 -0000 1.77
+++ repos.c 11 Mar 2004 14:32:00 -0000 1.78
@@ -348,7 +348,10 @@
"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 @@
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
"Could not write output file");
}
-
- if (status == APR_EOF)
- break;
}
apr_file_close(inf);