From 0a869e87bf88e53cc8f0f1c46629e98d7fe5220c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Fri, 27 Jan 2017 18:34:56 +0000 Subject: [PATCH] Make normalizedInstallationPathForHost also normalize Unicode --- Sparkle/SUInstaller.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sparkle/SUInstaller.m b/Sparkle/SUInstaller.m index 8a9d8f38..23d8c6e8 100644 --- a/Sparkle/SUInstaller.m +++ b/Sparkle/SUInstaller.m @@ -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