mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 19:35:38 +00:00
Monotone-Parent: bfd8aebdc5bf06b13f52fd7b6c23ae44f61d22db
Monotone-Revision: 5adace9fdd4a3bea534e57e39dcd9946d929292a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-03T14:18:05 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2007-07-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Main/SOGoProductLoader.m: only load bundle directories ending
|
||||
with the "SOGo" extension.
|
||||
|
||||
* Main/SOGo.m ([SOGo
|
||||
-_checkTableWithCM:cmtableURL:urlandType:tableType]): empty the
|
||||
result set if the query has caused no exception. Otherwise we get
|
||||
|
||||
+26
-21
@@ -146,35 +146,40 @@
|
||||
- (void)loadProducts {
|
||||
SoProductRegistry *registry = nil;
|
||||
NSFileManager *fm;
|
||||
NSEnumerator *pathes;
|
||||
NSString *lpath;
|
||||
|
||||
NSEnumerator *pathes;
|
||||
NSString *lpath, *bpath, *extension;
|
||||
NSEnumerator *productNames;
|
||||
NSString *productName;
|
||||
|
||||
registry = [SoProductRegistry sharedProductRegistry];
|
||||
fm = [NSFileManager defaultManager];
|
||||
|
||||
pathes = [[self productSearchPathes] objectEnumerator];
|
||||
while ((lpath = [pathes nextObject]) != nil) {
|
||||
NSEnumerator *productNames;
|
||||
NSString *productName;
|
||||
lpath = [pathes nextObject];
|
||||
while (lpath)
|
||||
{
|
||||
[self logWithFormat:@"scanning SOGo products in: %@", lpath];
|
||||
|
||||
[self logWithFormat:@"scanning SOGo products in: %@", lpath];
|
||||
productNames = [[fm directoryContentsAtPath: lpath] objectEnumerator];
|
||||
|
||||
productNames = [[fm directoryContentsAtPath:lpath] objectEnumerator];
|
||||
|
||||
while ((productName = [productNames nextObject]) != nil) {
|
||||
NSString *bpath;
|
||||
productName = [productNames nextObject];
|
||||
while (productName)
|
||||
{
|
||||
extension = [productName pathExtension];
|
||||
if ([extension length] > 0
|
||||
&& [extension isEqualToString: @"SOGo"])
|
||||
{
|
||||
bpath = [lpath stringByAppendingPathComponent: productName];
|
||||
[self logWithFormat:@" register SOGo product: %@",
|
||||
productName];
|
||||
[registry registerProductAtPath: bpath];
|
||||
}
|
||||
productName = [productNames nextObject];
|
||||
}
|
||||
|
||||
if ([[productName pathExtension] length] == 0)
|
||||
/* filter out directories without extensions */
|
||||
continue;
|
||||
|
||||
bpath = [lpath stringByAppendingPathComponent:productName];
|
||||
[self logWithFormat:@" register SOGo product: %@",
|
||||
[bpath lastPathComponent]];
|
||||
[registry registerProductAtPath:bpath];
|
||||
lpath = [pathes nextObject];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (![registry loadAllProducts])
|
||||
[self warnWithFormat:@"could not load all products !"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user