diff -ur mc-4.8.0.orig/src/filemanager/file.c mc-4.8.0/src/filemanager/file.c
old
|
new
|
|
1522 | 1522 | struct timeval tv_current, tv_last_update, tv_last_input; |
1523 | 1523 | int secs, update_secs; |
1524 | 1524 | const char *stalled_msg = ""; |
| 1525 | int read_size; |
| 1526 | char buf[BUF_8K]; |
1525 | 1527 | |
1526 | 1528 | tv_last_update = tv_transfer_start; |
1527 | 1529 | |
| 1530 | read_size = sizeof (buf) - ctx->do_reget % sizeof (buf); |
| 1531 | |
1528 | 1532 | for (;;) |
1529 | 1533 | { |
1530 | | char buf[BUF_8K]; |
1531 | | |
1532 | 1534 | /* src_read */ |
1533 | 1535 | if (mc_ctl (src_desc, VFS_CTL_IS_NOTREADY, 0)) |
1534 | 1536 | n_read = -1; |
1535 | 1537 | else |
1536 | | while ((n_read = mc_read (src_desc, buf, sizeof (buf))) < 0 && !ctx->skip_all) |
| 1538 | while ((n_read = mc_read (src_desc, buf, read_size)) < 0 && !ctx->skip_all) |
1537 | 1539 | { |
1538 | 1540 | return_status = file_error (_("Cannot read source file\"%s\"\n%s"), src_path); |
1539 | 1541 | if (return_status == FILE_RETRY) |
… |
… |
|
1545 | 1547 | if (n_read == 0) |
1546 | 1548 | break; |
1547 | 1549 | |
| 1550 | read_size = sizeof (buf); |
| 1551 | |
1548 | 1552 | gettimeofday (&tv_current, NULL); |
1549 | 1553 | |
1550 | 1554 | if (n_read > 0) |