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.
This commit is contained in:
Andy Matuschak committed 2008-09-19 18:24:52 -07:00
1 parent 21c60ef7ce
commit 13deac9b58
1 file changed
+12
+12
View File
@@ -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] ||