mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 23:07:12 +00:00
Monotone-Parent: cabe90d6f97f59078bc2811dccc1b93963503963
Monotone-Revision: 814e2c26d81893d5ea03ae14fc5a03d63cb2431a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-13T21:27:20 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
b33f0ff289
commit
7bfea6c8a1
4 files changed
+51
-5
No files matched your search
+12
-4
@@ -151,15 +151,18 @@ static BOOL debugObjectAllocation = NO;
|
||||
tableURL: (NSString *) url
|
||||
andType: (NSString *) tableType
|
||||
{
|
||||
NSString *tableName, *descFile;
|
||||
NSString *tableName, *descFile, *tableFile, *fileSuffix;
|
||||
EOAdaptorChannel *tc;
|
||||
NGBundleManager *bm;
|
||||
NSBundle *bundle;
|
||||
unsigned int length;
|
||||
NSURL *channelURL;
|
||||
|
||||
bm = [NGBundleManager defaultBundleManager];
|
||||
|
||||
tc = [cm acquireOpenChannelForURL: [NSURL URLWithString: url]];
|
||||
|
||||
channelURL = [NSURL URLWithString: url];
|
||||
fileSuffix = [channelURL scheme];
|
||||
tc = [cm acquireOpenChannelForURL: channelURL];
|
||||
|
||||
tableName = [url lastPathComponent];
|
||||
if ([tc evaluateExpressionX:
|
||||
@@ -167,8 +170,13 @@ static BOOL debugObjectAllocation = NO;
|
||||
{
|
||||
bundle = [bm bundleWithName: @"MainUI" type: @"SOGo"];
|
||||
length = [tableType length] - 3;
|
||||
descFile = [bundle pathForResource: [tableType substringToIndex: length]
|
||||
tableFile = [tableType substringToIndex: length];
|
||||
descFile
|
||||
= [bundle pathForResource: [NSString stringWithFormat: @"%@-%@",
|
||||
tableFile, fileSuffix]
|
||||
ofType: @"sql"];
|
||||
if (!descFile)
|
||||
descFile = [bundle pathForResource: tableFile ofType: @"sql"];
|
||||
if (![tc evaluateExpressionX:
|
||||
[NSString stringWithContentsOfFile: descFile]])
|
||||
[self logWithFormat: @"table '%@' successfully created!", tableName];
|
||||
|
||||
Reference in new issue
Block a user