mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user