Make normalizedInstallationPathForHost also normalize Unicode

This commit is contained in:
Kornel Lesiński committed 2017-01-27 18:34:56 +00:00
1 parent 14c543ccb3
commit 0a869e87bf
1 file changed
+4 -2
+4 -2
View File
@@ -154,8 +154,10 @@
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