File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,11 @@ - (id) initWithArguments:(NSDictionary *)arguments
90
90
{
91
91
self = [super init ];
92
92
if (self) {
93
- [[SparkleManager sharedManager ] startAutomaticallyCheckingForUpdates ];
93
+ SparkleManager *sharedSparkleManager = [SparkleManager sharedManager ];
94
+ NSWorkspace *sharedWorkspace = [NSWorkspace sharedWorkspace ];
95
+ NSString *pathToRelaunch = [sharedWorkspace absolutePathForAppBundleWithIdentifier: [self launchedAppBundleIdentifier ]];
96
+ [sharedSparkleManager setPathToRelaunch: pathToRelaunch];
97
+ [sharedSparkleManager startAutomaticallyCheckingForUpdates ];
94
98
95
99
if (![[NSUserDefaults standardUserDefaults ] objectForKey: sAutoLoadInvisibleFlashViewsKey ]) {
96
100
// Default to auto-loading invisible flash views.
Original file line number Diff line number Diff line change 31
31
@interface SparkleManager : NSObject {
32
32
SUUpdater *_updater;
33
33
BOOL _canUpdate;
34
+ NSString *_pathToRelaunch;
34
35
}
35
36
36
37
+ (id )sharedManager ;
39
40
- (void )startAutomaticallyCheckingForUpdates ;
40
41
- (void )checkForUpdates ;
41
42
43
+ @property (retain ) NSString *pathToRelaunch;
44
+
42
45
@end
Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ - (void)checkForUpdates {
117
117
}
118
118
119
119
- (NSString *)pathToRelaunchForUpdater : (SUUpdater*)updater {
120
- return [[ NSBundle mainBundle ] bundlePath ] ;
120
+ return _pathToRelaunch ;
121
121
}
122
122
123
+ @synthesize pathToRelaunch = _pathToRelaunch;
124
+
123
125
@end
You can’t perform that action at this time.
0 commit comments