Skip to content

Commit

Permalink
[FIX] Replace use of deprecated methods. (Jacques Vidrine via https:/…
Browse files Browse the repository at this point in the history
  • Loading branch information
rentzsch committed May 4, 2009
1 parent 2d74d2b commit 9806743
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sparkle/SUBasicUpdateDriver.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost
[appcast setDelegate:self];
NSString *userAgent = [NSString stringWithFormat: @"%@/%@ Sparkle/%@", [aHost name], [aHost displayVersion], ([SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil)];
NSData * cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
userAgent = [NSString stringWithCString:[cleanedAgent bytes] length:[cleanedAgent length]];
userAgent = [[NSString alloc] initWithData:cleanedAgent encoding:NSASCIIStringEncoding];
[appcast setUserAgentString:userAgent];
[appcast fetchAppcastFromURL:URL];
}
Expand Down
2 changes: 1 addition & 1 deletion Sparkle/SUHost.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (NSString *)publicDSAKey
// More likely, we've got a reference to a Resources file by filename:
NSString *keyFilename = [self objectForInfoDictionaryKey:SUPublicDSAKeyFileKey];
if (!keyFilename) { return nil; }
return [NSString stringWithContentsOfFile:[bundle pathForResource:keyFilename ofType:nil]];
return [NSString stringWithContentsOfFile:[bundle pathForResource:keyFilename ofType:nil] encoding:NSASCIIStringEncoding error:NULL];
}

- (NSArray *)systemProfile
Expand Down

0 comments on commit 9806743

Please sign in to comment.