From 54b114712fedfa7981774d02969585b392ce29db Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 4 May 2016 09:28:25 -0400 Subject: [PATCH] Revert "(fix) we now load 'base products' before any other ones" This reverts commit 3157fa022efe1a956b24bec1462b74ffe9800a25. --- SoObjects/SOGo/SOGoProductLoader.m | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/SoObjects/SOGo/SOGoProductLoader.m b/SoObjects/SOGo/SOGoProductLoader.m index be63d6912..aaeb7e0b0 100644 --- a/SoObjects/SOGo/SOGoProductLoader.m +++ b/SoObjects/SOGo/SOGoProductLoader.m @@ -30,13 +30,11 @@ #import "SOGoProductLoader.h" static NSString *productDirectoryName = @"SOGo"; -static NSArray *baseProducts; @implementation SOGoProductLoader + (id) productLoader { - baseProducts = [[NSArray alloc] initWithObjects: @"Appointments.SOGo", @"Contacts.SOGo", @"Mailer.SOGo", @"CommonUI.SOGo", @"MainUI.SOGo", nil]; return [[self new] autorelease]; } @@ -107,7 +105,7 @@ static NSArray *baseProducts; { SoProductRegistry *registry = nil; NSFileManager *fm; - NSMutableArray *loadedProducts, *remainingProducts; + NSMutableArray *loadedProducts; NSEnumerator *pathes; NSString *lpath, *bpath; NSEnumerator *productNames; @@ -124,20 +122,7 @@ static NSArray *baseProducts; pathes = [[self productSearchPathes] objectEnumerator]; while ((lpath = [pathes nextObject])) { - productNames = [baseProducts objectEnumerator]; - while ((productName = [productNames nextObject])) - { - bpath = [lpath stringByAppendingPathComponent: productName]; - if ([fm fileExistsAtPath: bpath]) - { - [registry registerProductAtPath: bpath]; - [loadedProducts addObject: productName]; - } - } - - remainingProducts = [NSMutableArray arrayWithArray: [fm directoryContentsAtPath: lpath]]; - [remainingProducts removeObjectsInArray: baseProducts]; - productNames = [remainingProducts objectEnumerator]; + productNames = [[fm directoryContentsAtPath: lpath] objectEnumerator]; while ((productName = [productNames nextObject])) { if ([[productName pathExtension] isEqualToString: @"SOGo"])