Bug 395539 - FTP TransportStatus's progressMax reports the full file size for REST retrieval (resuming partial download). Patch by Edward Lee <edilee@gmail.com>. r=cbiesinger, sr=cbiesinger, a=bzbarsky

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-09-17 13:35:11 -07:00
Родитель 20be5df68e
Коммит 3c215ff117
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -1907,8 +1907,10 @@ nsFtpState::OnTransportStatus(nsITransport *transport, nsresult status,
}
// Ignore the progressMax value from the socket. We know the true size of
// the file based on the response from our SIZE request.
mChannel->OnTransportStatus(nsnull, status, progress, mFileSize);
// the file based on the response from our SIZE request. Additionally, only
// report the max progress based on where we started/resumed.
mChannel->OnTransportStatus(nsnull, status, progress,
mFileSize - mChannel->StartPos());
return NS_OK;
}