mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Moved the check for whether the host is running from a disk image to SUBasicUpdateDriver so that all drivers could take advantage of this check.
This commit is contained in:
1 parent
21b4aeeb3b
commit
8b3d15b306
2 files changed
+7
-5
No files matched your search
@@ -14,6 +14,13 @@
|
||||
- (void)checkForUpdatesAtURL:(NSURL *)appcastURL hostBundle:(NSBundle *)hb
|
||||
{
|
||||
hostBundle = [hb retain];
|
||||
|
||||
if ([hostBundle isRunningFromDiskImage])
|
||||
{
|
||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURunningFromDiskImageError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:SULocalizedString(@"%1$@ can't be updated when it's running from a disk image. Move %1$@ to your Applications folder, relaunch it, and try again.", nil), [hostBundle name]] forKey:NSLocalizedDescriptionKey]]];
|
||||
return;
|
||||
}
|
||||
|
||||
SUAppcast *appcast = [[SUAppcast alloc] init];
|
||||
CFRetain(appcast); // We'll manage the appcast's memory ourselves so we don't have to make it an IV to support GC.
|
||||
[appcast release];
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
|
||||
- (void)checkForUpdatesAtURL:(NSURL *)appcastURL hostBundle:(NSBundle *)hb
|
||||
{
|
||||
if ([hostBundle isRunningFromDiskImage])
|
||||
{
|
||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SURunningFromDiskImageError userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:SULocalizedString(@"%1$@ can't be updated when it's running from a disk image. Move %1$@ to your Applications folder, relaunch it, and try again.", nil), [hostBundle name]] forKey:NSLocalizedDescriptionKey]]];
|
||||
return;
|
||||
}
|
||||
[super checkForUpdatesAtURL:appcastURL hostBundle:hb];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user