Revert "(fix) we now load 'base products' before any other ones"
This reverts commit 3157fa022e
.
pull/207/head
parent
031e2d4836
commit
54b114712f
|
@ -30,13 +30,11 @@
|
||||||
#import "SOGoProductLoader.h"
|
#import "SOGoProductLoader.h"
|
||||||
|
|
||||||
static NSString *productDirectoryName = @"SOGo";
|
static NSString *productDirectoryName = @"SOGo";
|
||||||
static NSArray *baseProducts;
|
|
||||||
|
|
||||||
@implementation SOGoProductLoader
|
@implementation SOGoProductLoader
|
||||||
|
|
||||||
+ (id) productLoader
|
+ (id) productLoader
|
||||||
{
|
{
|
||||||
baseProducts = [[NSArray alloc] initWithObjects: @"Appointments.SOGo", @"Contacts.SOGo", @"Mailer.SOGo", @"CommonUI.SOGo", @"MainUI.SOGo", nil];
|
|
||||||
return [[self new] autorelease];
|
return [[self new] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +105,7 @@ static NSArray *baseProducts;
|
||||||
{
|
{
|
||||||
SoProductRegistry *registry = nil;
|
SoProductRegistry *registry = nil;
|
||||||
NSFileManager *fm;
|
NSFileManager *fm;
|
||||||
NSMutableArray *loadedProducts, *remainingProducts;
|
NSMutableArray *loadedProducts;
|
||||||
NSEnumerator *pathes;
|
NSEnumerator *pathes;
|
||||||
NSString *lpath, *bpath;
|
NSString *lpath, *bpath;
|
||||||
NSEnumerator *productNames;
|
NSEnumerator *productNames;
|
||||||
|
@ -124,20 +122,7 @@ static NSArray *baseProducts;
|
||||||
pathes = [[self productSearchPathes] objectEnumerator];
|
pathes = [[self productSearchPathes] objectEnumerator];
|
||||||
while ((lpath = [pathes nextObject]))
|
while ((lpath = [pathes nextObject]))
|
||||||
{
|
{
|
||||||
productNames = [baseProducts objectEnumerator];
|
productNames = [[fm directoryContentsAtPath: lpath] 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];
|
|
||||||
while ((productName = [productNames nextObject]))
|
while ((productName = [productNames nextObject]))
|
||||||
{
|
{
|
||||||
if ([[productName pathExtension] isEqualToString: @"SOGo"])
|
if ([[productName pathExtension] isEqualToString: @"SOGo"])
|
||||||
|
|
Loading…
Reference in New Issue