mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Only log missing 'length' warning once per all appcast item instances
This commit is contained in:
1 parent
56cd205880
commit
325059484f
1 file changed
+4
-1
Vendored
+4
-1
@@ -236,7 +236,10 @@ static NSString *SUAppcastItemInstallationTypeKey = @"SUAppcastItemInstallationT
|
||||
if (enclosureLengthString != nil) {
|
||||
contentLength = [enclosureLengthString integerValue];
|
||||
} else {
|
||||
SULog(@"warning: <%@> for URL '%@' is missing %@ attribute. Downloading progress may be unreliable. Please always specify %@", SURSSElementEnclosure, [enclosure objectForKey:SURSSAttributeURL], SURSSAttributeLength, SURSSAttributeLength);
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
SULog(@"warning: <%@> for URL '%@' is missing %@ attribute. Downloading progress may be unreliable. Please always specify %@", SURSSElementEnclosure, [enclosure objectForKey:SURSSAttributeURL], SURSSAttributeLength, SURSSAttributeLength);
|
||||
});
|
||||
}
|
||||
_contentLength = (contentLength > 0) ? (NSUInteger)contentLength : 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user