mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-22 06:42:44 +00:00
Monotone-Parent: c586ecab910c391dd7676a0406b4511602a80b3e
Monotone-Revision: 31c616af5df5ea18c34f33008cee7ec5688b43ba Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-08T19:58:54 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2011-07-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/SOGoMAPIFSFolder.m (-initWithName:inContainer:):
|
||||
added method to properly initialize the "directory" ivar when
|
||||
initialized as a subfolder.
|
||||
|
||||
* OpenChange/MAPIStoreMailContext.m: MAPIStoreDeletedItemsContext
|
||||
is now temporarily a fs-based context.
|
||||
|
||||
|
||||
@@ -120,6 +120,19 @@ static NSString *privateDir = nil;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithName: (NSString *) newName
|
||||
inContainer: (id) newContainer
|
||||
{
|
||||
if ((self = [super initWithName: newName inContainer: newContainer]))
|
||||
{
|
||||
directory = [[newContainer directory]
|
||||
stringByAppendingPathComponent: newName];
|
||||
[directory retain];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *) directory
|
||||
{
|
||||
return directory;
|
||||
@@ -141,6 +154,10 @@ static NSString *privateDir = nil;
|
||||
NSDictionary *attributes;
|
||||
BOOL isDir;
|
||||
|
||||
if (!directory)
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
format: @"directory is nil"];
|
||||
|
||||
fm = [NSFileManager defaultManager];
|
||||
if ([fm fileExistsAtPath: directory isDirectory: &isDir])
|
||||
{
|
||||
@@ -218,8 +235,8 @@ static NSString *privateDir = nil;
|
||||
isDirectory: &isDir])
|
||||
{
|
||||
if (isDir)
|
||||
object = [SOGoMAPIFSFolder objectWithName: fileName
|
||||
inContainer: self];
|
||||
object = [isa objectWithName: fileName
|
||||
inContainer: self];
|
||||
else
|
||||
object = [SOGoMAPIFSMessage objectWithName: fileName
|
||||
inContainer: self];
|
||||
|
||||
Reference in New Issue
Block a user