aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPAppController.m9
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];