improve file_too_short error message

This commit is contained in:
Arvid Norberg 2011-04-25 06:02:19 +00:00
parent d0af936933
commit 29ce1a3704
1 changed files with 4 additions and 1 deletions

View File

@ -1191,7 +1191,10 @@ ret:
}
if (file_bytes_left != bytes_transferred)
return bytes_transferred;
{
set_error(combine_path(m_save_path, files().file_path(*file_iter)), errors::file_too_short);
return -1;
}
advance_bufs(current_buf, bytes_transferred);
TORRENT_ASSERT(count_bufs(current_buf, bytes_left - file_bytes_left) <= num_bufs);