mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-17 23:09:32 +00:00
shortened relaunch NSTask invocation
This commit is contained in:
@@ -55,11 +55,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)relaunchAfterDelay:(CGFloat)seconds {
|
- (void)relaunchAfterDelay:(CGFloat)seconds {
|
||||||
NSTask *task = [[NSTask alloc] init];
|
NSArray *args = @[@"-c", [NSString stringWithFormat:@"sleep %f; open \"%@\"", seconds, NSBundle.mainBundle.bundlePath]];
|
||||||
task.launchPath = @"/bin/sh";
|
[NSTask launchedTaskWithLaunchPath:@"/bin/sh" arguments:args];
|
||||||
task.arguments = @[ @"-c", [NSString stringWithFormat:@"sleep %f; open \"%@\"", seconds, NSBundle.mainBundle.bundlePath] ];
|
[self terminate:self];
|
||||||
[task launch];
|
|
||||||
[self terminate:nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MPAppDelegate *)mp_delegate {
|
- (MPAppDelegate *)mp_delegate {
|
||||||
|
|||||||
Reference in New Issue
Block a user