Monotone-Parent: c0e690042905295d3b7946d9d917fcf8e91982ef

Monotone-Revision: f8b29d68c36441f92d7ffe8056a95fd25a2fd409

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-10-17T22:29:51
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-10-17 22:29:51 +00:00
parent fdf333c65c
commit 4e7ed2dab8
11 changed files with 126 additions and 29 deletions
+20 -12
View File
@@ -888,13 +888,12 @@ static BOOL debugSoParts = NO;
return nil;
}
- (NSException *) moveToFolderNamed: (NSString *) folderName
- (NSException *) copyToFolderNamed: (NSString *) folderName
inContext: (id)_ctx
{
SOGoMailAccounts *destFolder;
NSEnumerator *folders;
NSString *currentFolderName, *reason;
NSException *error;
// TODO: check for safe HTTP method
@@ -924,18 +923,27 @@ static BOOL debugSoParts = NO;
[destFolder flushMailCaches];
/* a) copy */
error = [self davCopyToTargetObject: destFolder
newName: @"fakeNewUnusedByIMAP4" /* autoassigned */
inContext:_ctx];
if (error != nil) return error;
/* b) mark deleted */
error = [[self imap4Connection] markURLDeleted: [self imap4URL]];
if (error != nil) return error;
return [self davCopyToTargetObject: destFolder
newName: @"fakeNewUnusedByIMAP4" /* autoassigned */
inContext:_ctx];
}
[self flushMailCaches];
- (NSException *) moveToFolderNamed: (NSString *) folderName
inContext: (id)_ctx
{
NSException *error;
if (![self copyToFolderNamed: folderName
inContext: _ctx])
{
/* b) mark deleted */
error = [[self imap4Connection] markURLDeleted: [self imap4URL]];
if (error != nil) return error;
[self flushMailCaches];
}
return nil;
}