don't try to hash empty read in do_uncached_hash

This commit is contained in:
Steven Siloti 2019-02-10 11:01:48 -08:00 committed by Arvid Norberg
parent 0cbfef99b7
commit d33b0506a0
1 changed files with 1 additions and 1 deletions

View File

@ -2132,7 +2132,7 @@ constexpr disk_job_flags_t disk_interface::cache_hit;
iov = iov.first(std::min(default_block_size, piece_size - offset)); iov = iov.first(std::min(default_block_size, piece_size - offset));
ret = j->storage->readv(iov, j->piece, offset, file_flags, j->error); ret = j->storage->readv(iov, j->piece, offset, file_flags, j->error);
if (ret < 0) break; if (ret <= 0) break;
iov = iov.first(ret); iov = iov.first(ret);
if (!j->error.ec) if (!j->error.ec)