Monotone-Parent: 6b7485d7999f592e4a4b077024f47c2323c3fdbc

Monotone-Revision: d47c52bbe608df33a336ba2d63dad8b7524aa9d7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-09-22T21:31:42
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-09-22 21:31:42 +00:00
parent ffffac624a
commit 4371dba9a1
10 changed files with 107 additions and 415 deletions
-44
View File
@@ -975,50 +975,6 @@ static BOOL debugSoParts = NO;
/* operations */
- (NSException *) trashInContext: (id) _ctx
{
/*
Trashing is three actions:
a) copy to trash folder
b) mark mail as deleted
c) expunge folder
In case b) or c) fails, we can't do anything because IMAP4 doesn't tell us
the ID used in the trash folder.
*/
SOGoMailFolder *trashFolder;
NSException *error;
// TODO: check for safe HTTP method
trashFolder = [[self mailAccountFolder] trashFolderInContext: _ctx];
if ([trashFolder isKindOfClass:[NSException class]])
return (NSException *)trashFolder;
if (![trashFolder isNotNull]) {
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
reason: @"Did not find Trash folder!"];
}
[trashFolder flushMailCaches];
/* a) copy */
error = [self davCopyToTargetObject:trashFolder
newName: @"fakeNewUnusedByIMAP4" /* autoassigned */
inContext:_ctx];
if (error) return error;
/* b) mark deleted */
error = [[self imap4Connection] markURLDeleted: [self imap4URL]];
if (error) return error;
[container markForExpunge];
[self flushMailCaches];
return nil;
}
- (NSException *) copyToFolderNamed: (NSString *) folderName
inContext: (id)_ctx
{