Skip to content

Commit

Permalink
Make normalizedInstallationPathForHost also normalize Unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jan 27, 2017
1 parent 14c543c commit 0a869e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sparkle/SUInstaller.m
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ + (NSString *)normalizedInstallationPathForHost:(SUHost *)host
assert(bundle != nil);

NSString *normalizedAppPath = [[[bundle bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", [host objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleNameKey], [[bundle bundlePath] pathExtension]]];

return normalizedAppPath;

// Roundtrip string through fileSystemRepresentation to ensure it uses filesystem's Unicode normalization
// rather than arbitrary Unicode form from Info.plist - #1017
return [NSString stringWithUTF8String:[normalizedAppPath fileSystemRepresentation]];
}

@end

0 comments on commit 0a869e8

Please sign in to comment.