mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-15 17:22:25 +00:00
Skipping any bundles we cannot name correctly
This commit is contained in:
@@ -86,6 +86,9 @@
|
|||||||
for(NSString *bundleIdentifier in [self _bundleIdentifierForHTTPS]) {
|
for(NSString *bundleIdentifier in [self _bundleIdentifierForHTTPS]) {
|
||||||
NSString *bundlePath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:bundleIdentifier];
|
NSString *bundlePath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:bundleIdentifier];
|
||||||
NSString *browserName = [[NSFileManager defaultManager] displayNameAtPath:bundlePath];
|
NSString *browserName = [[NSFileManager defaultManager] displayNameAtPath:bundlePath];
|
||||||
|
if(nil == bundlePath || nil == browserName) {
|
||||||
|
continue; // Skip missing Applications
|
||||||
|
}
|
||||||
NSMenuItem *browserItem = [[NSMenuItem alloc] initWithTitle:browserName action:@selector(selectBrowser:) keyEquivalent:@""];
|
NSMenuItem *browserItem = [[NSMenuItem alloc] initWithTitle:browserName action:@selector(selectBrowser:) keyEquivalent:@""];
|
||||||
[browserItem setRepresentedObject:bundleIdentifier];
|
[browserItem setRepresentedObject:bundleIdentifier];
|
||||||
[browserItem setTarget:self];
|
[browserItem setTarget:self];
|
||||||
|
|||||||
Reference in New Issue
Block a user