mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-09 04:17:30 +08:00
[http] Fix a bug when downloading zip file.
This commit is contained in:
parent
8e4efdc166
commit
0ebc3c21e1
@ -243,13 +243,11 @@ write_dir_data_cb (struct bufferevent *bev, void *ctx)
|
||||
int n;
|
||||
|
||||
n = readn (data->zipfd, buf, sizeof(buf));
|
||||
if (n <= 0) {
|
||||
if (n < 0) {
|
||||
seaf_warning ("failed to read zipfile %s\n", data->zipfile);
|
||||
evhtp_connection_free (evhtp_request_get_connection (data->req));
|
||||
free_senddir_data (data);
|
||||
return;
|
||||
|
||||
} else {
|
||||
} else if (n > 0) {
|
||||
bufferevent_write (bev, buf, n);
|
||||
data->remain -= n;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user