diff options
author | rowanbeentje <rowan@beent.je> | 2011-01-03 22:58:07 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-01-03 22:58:07 +0000 |
commit | e85f7dfdc240b9e5be2ff4cbe46727f49096f91f (patch) | |
tree | 7049a3cebfbe513fbd78fedda338f5e8d2acce70 /Source | |
parent | f7874daaeb147cda239b69330a7819aba5bb3bbc (diff) | |
download | sequelpro-e85f7dfdc240b9e5be2ff4cbe46727f49096f91f.tar.gz sequelpro-e85f7dfdc240b9e5be2ff4cbe46727f49096f91f.tar.bz2 sequelpro-e85f7dfdc240b9e5be2ff4cbe46727f49096f91f.zip |
- Alter bundle search paths to no longer add a blank location as the first option if the Application support bundles folder does not exist; addresses issues where default bundles are updated in the hard disk root
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAppController.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index f13a43f6..99f950a1 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -1346,10 +1346,11 @@ // Clean menu [menu compatibleRemoveAllItems]; - NSArray *bundlePaths = [NSArray arrayWithObjects: - ([[NSFileManager defaultManager] applicationSupportDirectoryForSubDirectory:SPBundleSupportFolder createIfNotExists:NO error:nil])?:@"", - [NSString stringWithFormat:@"%@/Contents/SharedSupport/Default Bundles", [[NSBundle mainBundle] bundlePath]], - nil]; + // Set up the bundle search paths - always the default bundles directory, and the application support directory if it exists + NSMutableArray *bundlePaths = [NSMutableArray arrayWithCapacity:2]; + NSString *appSupportPath = [[NSFileManager defaultManager] applicationSupportDirectoryForSubDirectory:SPBundleSupportFolder createIfNotExists:NO error:nil]; + if (appSupportPath) [bundlePaths addObject:appSupportPath]; + [bundlePaths addObject:[NSString stringWithFormat:@"%@/Contents/SharedSupport/Default Bundles", [[NSBundle mainBundle] bundlePath]]]; BOOL processDefaultBundles = NO; NSFileManager *fm = [NSFileManager defaultManager]; |