Finally fix bogus terrasync download numbers.
(Staying a hotel with sufficiently slow wi-fi to debug this!)
This commit is contained in:
@@ -756,7 +756,12 @@ size_t HTTPRepository::bytesToDownload() const
|
||||
}
|
||||
|
||||
for (r = _d->activeRequests.begin(); r != _d->activeRequests.end(); ++r) {
|
||||
result += (*r)->contentSize() - (*r)->responseBytesReceived();
|
||||
if ((*r)->contentSize() > 0) {
|
||||
// Content size for root dirindex of a repository is zero,
|
||||
// and returing a negative value breaks everyting, so just ignore
|
||||
// it
|
||||
result += (*r)->contentSize() - (*r)->responseBytesReceived();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user