From 6f30ae2093c77f229fb15ea8560c88f9074a7e73 Mon Sep 17 00:00:00 2001 From: Zorg Date: Tue, 8 Mar 2016 00:16:03 -0500 Subject: [PATCH] Remove passing duplicated host path --- Sparkle/Autoupdate/Autoupdate.m | 17 ++++++++--------- Sparkle/SUBasicUpdateDriver.m | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index 86fbffba..543955d7 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -33,17 +33,16 @@ int main(int __unused argc, const char __unused *argv[]) @autoreleasepool { NSArray *args = [[NSProcessInfo processInfo] arguments]; - if (args.count != 8) { + if (args.count != 7) { return EXIT_FAILURE; } - NSString *hostPath = args[1]; - NSString *relaunchPath = args[2]; - NSString *hostBundlePath = args[3]; - NSString *updateDirectoryPath = args[4]; - BOOL shouldRelaunchApp = [args[5] boolValue]; - BOOL shouldShowUI = [args[6] boolValue]; - BOOL shouldRelaunchTool = [args[7] boolValue]; + NSString *relaunchPath = args[1]; + NSString *hostBundlePath = args[2]; + NSString *updateDirectoryPath = args[3]; + BOOL shouldRelaunchApp = [args[4] boolValue]; + BOOL shouldShowUI = [args[5] boolValue]; + BOOL shouldRelaunchTool = [args[6] boolValue]; if (shouldRelaunchTool) { NSURL *mainBundleURL = [[NSBundle mainBundle] bundleURL]; @@ -84,7 +83,7 @@ int main(int __unused argc, const char __unused *argv[]) } } - AppInstaller *appInstaller = [[AppInstaller alloc] initWithHostPath:hostPath + AppInstaller *appInstaller = [[AppInstaller alloc] initWithHostPath:hostBundlePath relaunchPath:relaunchPath hostProcessIdentifier:activeProcessIdentifier updateFolderPath:updateDirectoryPath diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 5a7b5c92..9e2e64f8 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -547,7 +547,7 @@ pathToRelaunch = [updaterDelegate pathToRelaunchForUpdater:self.updater]; } - NSArray *launchArguments = @[[self.host bundlePath], + NSArray *launchArguments = @[ pathToRelaunch, self.host.bundlePath, self.tempDir,