Subclassing fixes #661

This commit is contained in:
Kornel Lesiński committed 2015-10-22 13:55:01 +01:00
1 parent 658e5fcb9f
commit 154aa1b0db
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -37,7 +37,8 @@ static NSString *const SUSystemProfilerPreferredLanguageKey = @"lang";
- (NSDictionary *)modelTranslationTable
{
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"SUModelTranslation" ofType:@"plist"];
// Use explicit class to use the correct bundle even when subclassed
NSString *path = [[NSBundle bundleForClass:[SUSystemProfiler class]] pathForResource:@"SUModelTranslation" ofType:@"plist"];
return [[NSDictionary alloc] initWithContentsOfFile:path];
}
+1
View File
@@ -83,6 +83,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
self = [super init];
if (bundle == nil) bundle = [NSBundle mainBundle];
// Use explicit class to use the correct bundle even when subclassed
self.sparkleBundle = [NSBundle bundleForClass:[SUUpdater class]];
if (!self.sparkleBundle) {
SULog(@"Error: SUUpdater can't find Sparkle.framework it belongs to");