Fixed a bug that duplicated messages on move (in trash folder)

Monotone-Parent: 93e3ee8d7dc1f21a4f8a7f576b722c8b564aecde
Monotone-Revision: 717b1106bd82a838188f97c4b88f9caa35e59586

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2008-10-03T21:05:53
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2008-10-03 21:05:53 +00:00
parent 5057bd6067
commit 53a1764c22

View File

@@ -438,11 +438,22 @@ static NSString *spoolFolder = nil;
inContext: (id) localContext
{
id result;
NGImap4Client *client;
client = [[self imap4Connection] client];
result = [self copyUIDs: uids toFolder: destinationFolder inContext: localContext];
if ( ![result isNotNull] )
result = [self deleteUIDs: uids inContext: localContext];
if ( ![result isNotNull] ) {
result = [client storeFlags: [NSArray arrayWithObject: @"Deleted"]
forUIDs: uids addOrRemove: YES];
if ([[result valueForKey: @"result"] boolValue])
{
[self markForExpunge];
result = nil;
}
}
return result;
}