mirror of https://github.com/aria2/aria2
2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Make finished() return true only when offset == totalLength. * src/AdaptiveFileAllocationIterator.cc * src/SingleFileAllocationIterator.ccpull/1/head
parent
d687886c24
commit
6e7dd1650e
|
@ -1,3 +1,9 @@
|
|||
2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Make finished() return true only when offset == totalLength.
|
||||
* src/AdaptiveFileAllocationIterator.cc
|
||||
* src/SingleFileAllocationIterator.cc
|
||||
|
||||
2010-09-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Moved connectedHostname, connectedAddr and connectedPort to
|
||||
|
|
|
@ -93,7 +93,7 @@ void AdaptiveFileAllocationIterator::allocateChunk()
|
|||
bool AdaptiveFileAllocationIterator::finished()
|
||||
{
|
||||
if(allocator_.isNull()) {
|
||||
return (uint64_t)offset_ >= totalLength_;
|
||||
return (uint64_t)offset_ == totalLength_;
|
||||
} else {
|
||||
return allocator_->finished();
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ void SingleFileAllocationIterator::allocateChunk()
|
|||
|
||||
bool SingleFileAllocationIterator::finished()
|
||||
{
|
||||
return (uint64_t)offset_ >= totalLength_;
|
||||
return (uint64_t)offset_ == totalLength_;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Reference in New Issue