Fixed the bug that AdaptiveFileAllocationIterator::finished() returns false even if offset_ >= totalLength_. This causes ftruncate error for seeding torrents. * src/AdaptiveFileAllocationIterator.cc
@@ -1,3 +1,10 @@
+2010-07-09 Tatsuhiro Tsujikawa <[email protected]>
+
+ 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 <[email protected]>
Send each CWD component of FTP URI in separate CWD command as
@@ -93,7 +93,7 @@ void AdaptiveFileAllocationIterator::allocateChunk()
bool AdaptiveFileAllocationIterator::finished()
{
if(allocator_.isNull()) {
- return false;
+ return (uint64_t)offset_ >= totalLength_;
} else {
return allocator_->finished();
}