mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Changed calls to longValue to calls to doubleValue; using the former is potentially a problem when something's saved as an NSString when we expect an NSNumber. This'll handle both cases.
This commit is contained in:
1 parent
a39f0cfd00
commit
ff5001fe41
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -82,9 +82,9 @@ static SUUpdater *sharedUpdater = nil;
|
||||
{
|
||||
// Find the stored check interval. User defaults override Info.plist.
|
||||
if ([[SUUserDefaults standardUserDefaults] objectForKey:SUScheduledCheckIntervalKey])
|
||||
checkInterval = [[[SUUserDefaults standardUserDefaults] objectForKey:SUScheduledCheckIntervalKey] longValue];
|
||||
checkInterval = [[[SUUserDefaults standardUserDefaults] objectForKey:SUScheduledCheckIntervalKey] doubleValue];
|
||||
else if ([hostBundle objectForInfoDictionaryKey:SUScheduledCheckIntervalKey])
|
||||
checkInterval = [[hostBundle objectForInfoDictionaryKey:SUScheduledCheckIntervalKey] longValue];
|
||||
checkInterval = [[hostBundle objectForInfoDictionaryKey:SUScheduledCheckIntervalKey] doubleValue];
|
||||
|
||||
if (checkInterval < SU_MIN_CHECK_INTERVAL) // This can also mean one that isn't set.
|
||||
checkInterval = SU_DEFAULT_CHECK_INTERVAL;
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
{
|
||||
// We do this here instead of in extractUpdate so that we only have a determinate progress bar for archives with progress.
|
||||
if ([statusController maxProgressValue] == 0)
|
||||
[statusController setMaxProgressValue:[[[[NSFileManager defaultManager] fileAttributesAtPath:downloadPath traverseLink:NO] objectForKey:NSFileSize] longValue]];
|
||||
[statusController setMaxProgressValue:[[[[NSFileManager defaultManager] fileAttributesAtPath:downloadPath traverseLink:NO] objectForKey:NSFileSize] doubleValue]];
|
||||
[statusController setProgressValue:[statusController progressValue] + length];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user