summaryrefslogtreecommitdiff
path: root/src/RequestGroup.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/RequestGroup.cc')
-rw-r--r--src/RequestGroup.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc
index 1e79bda6..7835782d 100644
--- a/src/RequestGroup.cc
+++ b/src/RequestGroup.cc
@@ -525,7 +525,9 @@ void RequestGroup::processCheckIntegrityEntry
void RequestGroup::initPieceStorage()
{
SharedHandle<PieceStorage> tempPieceStorage;
- if(downloadContext_->knowsTotalLength()) {
+ if(downloadContext_->knowsTotalLength() &&
+ (downloadContext_->getTotalLength() > 0 ||
+ downloadContext_->hasAttribute(bittorrent::BITTORRENT))) {
#ifdef ENABLE_BITTORRENT
SharedHandle<DefaultPieceStorage> ps
(new DefaultPieceStorage(downloadContext_, option_.get()));