mirror of
https://github.com/nginx/nginx.git
synced 2024-12-05 06:19:01 +08:00
test incomplete WriteFile()
This commit is contained in:
parent
f4d97e2472
commit
5631879c7a
@ -96,6 +96,13 @@ ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (n != size) {
|
||||
ngx_log_error(NGX_LOG_CRIT, file->log, 0,
|
||||
"WriteFile() \"%s\" has written only %ul of %uz",
|
||||
file->name.data, n, size);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
file->offset += n;
|
||||
|
||||
return n;
|
||||
|
Loading…
Reference in New Issue
Block a user