2009-07-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed bufSize calculation
	* src/DownloadCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-07-01 13:23:22 +00:00
parent 30b65f79e7
commit 5562636c99
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-07-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed bufSize calculation
* src/DownloadCommand.cc
2009-07-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2009-07-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't append "/" if base URI ends with "/". Don't append "/" if base URI ends with "/".

View File

@ -121,7 +121,7 @@ bool DownloadCommand::executeInternal() {
bufSize = std::min(segment->getLength()-segment->getWrittenLength(), bufSize = std::min(segment->getLength()-segment->getWrittenLength(),
BUFSIZE); BUFSIZE);
} else { } else {
bufSize = std::min(static_cast<size_t>(_fileEntry->getLastOffset()-_fileEntry->gtoloff(segment->getPositionToWrite())), BUFSIZE); bufSize = std::min(static_cast<size_t>(_fileEntry->getLastOffset()-segment->getPositionToWrite()), BUFSIZE);
} }
} else { } else {
bufSize = BUFSIZE; bufSize = BUFSIZE;