Monotone-Parent: 638f19a902b772b34bc553dda4b8925b5d0639df

Monotone-Revision: 599ccb5bc0882492dab453f5e9af28f0342e6a87

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-02-03T14:55:19
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2012-02-03 14:55:19 +00:00
parent 82b2bedd7e
commit 8cbe8f862e
3 changed files with 16 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
2012-02-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Mailer/SOGoMailFolder.m (-exists): new method that
returns whether an IMAP folder exists or not yet.
2012-02-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreUserContext.m (-destroy): dont't release

View File

@@ -82,6 +82,8 @@
- (void) markForExpunge;
- (void) expungeLastMarkedFolder;
- (BOOL) exists;
- (BOOL) create;
- (NSException *) expunge;

View File

@@ -248,7 +248,7 @@ static NSString *defaultUserID = @"anyone";
if (!filenames)
{
filenames = [NSMutableArray new];
if ([[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]])
if ([self exists])
{
uids = [self fetchUIDsMatchingQualifier: nil sortOrdering: @"DATE"];
if (![uids isKindOfClass: [NSException class]])
@@ -555,7 +555,7 @@ static NSString *defaultUserID = @"anyone";
NSString *archiveName;
EOQualifier *notDeleted;
if ([[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]])
if ([self exists])
{
notDeleted = [EOQualifier qualifierWithQualifierFormat:
@"(not (flags = %@))", @"deleted"];
@@ -722,7 +722,7 @@ static NSString *defaultUserID = @"anyone";
{
// We check for the existence of the IMAP folder (likely to be the
// Sent mailbox) prior to appending messages to it.
if ([[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]]
if ([self exists]
|| ![[self imap4Connection] createMailbox: [[self imap4Connection] imap4FolderNameForURL: [self imap4URL]]
atURL: [[self mailAccountFolder] imap4URL]])
return [[self imap4Connection] postData: _data flags: _flags
@@ -835,7 +835,7 @@ static NSString *defaultUserID = @"anyone";
inContainer: self];
}
else if (isdigit ([_key characterAtIndex: 0])
&& [[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]])
&& [self exists])
{
obj = [SOGoMailObject objectWithName: _key inContainer: self];
if ([_key hasSuffix: @".eml"])
@@ -863,6 +863,11 @@ static NSString *defaultUserID = @"anyone";
return [[self imap4Connection] createMailbox:_name atURL:[self imap4URL]];
}
- (BOOL) exists
{
return [[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]];
}
- (BOOL) create
{
NSException *error;