mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Fix unused appcast length fallback if server reports no content size (#2922)
Potentially this could result in an indeterminate progress bar even though the appcast specifies the length of the download.
This commit is contained in:
1 file changed
+2
-2
@@ -312,9 +312,9 @@ static bool SPUValidateStatusCodeAndFailIfInvalid(NSURLResponse * _Nullable resp
|
||||
return;
|
||||
}
|
||||
|
||||
if (totalBytesExpectedToWrite > 0 && !_receivedExpectedBytes) {
|
||||
if (!_receivedExpectedBytes) {
|
||||
_receivedExpectedBytes = YES;
|
||||
[_delegate downloaderDidReceiveExpectedContentLength:totalBytesExpectedToWrite];
|
||||
[_delegate downloaderDidReceiveExpectedContentLength:(totalBytesExpectedToWrite != NSURLSessionTransferSizeUnknown) ? totalBytesExpectedToWrite : 0];
|
||||
}
|
||||
|
||||
if (bytesWritten >= 0) {
|
||||
|
||||
Reference in new issue
Block a user