--- modules/dav/fs/repos.c.orig 2008-08-15 15:12:47.000000000 -0700 +++ modules/dav/fs/repos.c 2012-03-19 08:47:12.000000000 -0700 @@ -879,7 +879,11 @@ static dav_error * dav_fs_close_stream(dav_stream *stream, int commit) { - apr_file_close(stream->f); + apr_status_t status = apr_file_close(stream->f); + + if (status != APR_SUCCESS) { + return dav_new_error(stream->p, MAP_IO2HTTP(status), 0, "There was a problem closing the stream"); + } if (!commit) { if (apr_file_remove(stream->pathname, stream->p) != APR_SUCCESS) {