From 13deac9b5898272e85e1df0f18f50707bb34608e Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Fri, 19 Sep 2008 18:24:52 -0700 Subject: [PATCH] Fixes 271378 Sparkle is now willing to install a bundle in the archive with the same bundle identifier as the running app as a fallback strategy. Thanks to Jim Turner for the patch. --- SUInstaller.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SUInstaller.m b/SUInstaller.m index 15ebb1a2..6d968fea 100644 --- a/SUInstaller.m +++ b/SUInstaller.m @@ -9,6 +9,7 @@ #import "SUInstaller.h" #import "SUPlainInstaller.h" #import "SUPackageInstaller.h" +#import "SUHost.h" @implementation SUInstaller @@ -55,6 +56,17 @@ newAppDownloadPath = currentPath; break; } + else + { + // Try matching on bundle identifiers in case the user has changed the name of the host app + NSBundle *incomingBundle = [NSBundle bundleWithPath:currentPath]; + if(incomingBundle && [[incomingBundle bundleIdentifier] isEqualToString:[[host bundle] bundleIdentifier]]) + { + isPackage = NO; + newAppDownloadPath = currentPath; + break; + } + } // Some DMGs have symlinks into /Applications! That's no good! And there's no point in looking in bundles. if ([self _isAliasFolderAtPath:currentPath] ||