diff --git a/ChangeLog b/ChangeLog index f1c310d7..33f8b8ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-07-09 Tatsuhiro Tsujikawa + + Fixed the bug that AdaptiveFileAllocationIterator::finished() + returns false even if offset_ >= totalLength_. This causes + ftruncate error for seeding torrents. + * src/AdaptiveFileAllocationIterator.cc + 2010-07-09 Tatsuhiro Tsujikawa Send each CWD component of FTP URI in separate CWD command as diff --git a/src/AdaptiveFileAllocationIterator.cc b/src/AdaptiveFileAllocationIterator.cc index 3ec80fb6..d8586384 100644 --- a/src/AdaptiveFileAllocationIterator.cc +++ b/src/AdaptiveFileAllocationIterator.cc @@ -93,7 +93,7 @@ void AdaptiveFileAllocationIterator::allocateChunk() bool AdaptiveFileAllocationIterator::finished() { if(allocator_.isNull()) { - return false; + return (uint64_t)offset_ >= totalLength_; } else { return allocator_->finished(); }