From 030d97f4fc8bd07645ecce4f34372f9e24dcc76f Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Sun, 17 Aug 2014 01:11:32 +0200 Subject: [PATCH] Using NSFileManager to locate URL for Applications --- MacPass/MPWorkflowSettingsController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MacPass/MPWorkflowSettingsController.m b/MacPass/MPWorkflowSettingsController.m index 7bbdaf48..c4b65964 100644 --- a/MacPass/MPWorkflowSettingsController.m +++ b/MacPass/MPWorkflowSettingsController.m @@ -51,7 +51,8 @@ - (void)showCustomBrowserSelection:(id)sender { NSOpenPanel *openPanel = [NSOpenPanel openPanel]; - [openPanel setDirectoryURL:[NSURL URLWithString:@"/Applications"]]; + NSURL *applicationURL = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationDirectory inDomains:NSSystemDomainMask][0]; + [openPanel setDirectoryURL:applicationURL]; [openPanel setAllowsMultipleSelection:NO]; [openPanel setCanChooseDirectories:NO]; [openPanel setCanChooseFiles:YES];