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