Monotone-Parent: bce92d5d3cf0a781944fc96a15b832a767285d0f

Monotone-Revision: c4fba0dfa99628493a8d5c73f359b267fb922961

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-09-29T15:52:27
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-09-29 15:52:27 +00:00
parent c5096d72f1
commit e0f4f1ba56
1 changed files with 14 additions and 8 deletions

View File

@ -132,11 +132,11 @@ static Class SOGoMailFolderK;
- (id) initWithSOGoObject: (id) newSOGoObject - (id) initWithSOGoObject: (id) newSOGoObject
inContainer: (MAPIStoreObject *) newContainer inContainer: (MAPIStoreObject *) newContainer
{ {
NSString *urlString; // NSString *urlString;
if ((self = [super initWithSOGoObject: newSOGoObject inContainer: newContainer])) if ((self = [super initWithSOGoObject: newSOGoObject inContainer: newContainer]))
{ {
urlString = [[self url] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; // urlString = [[self url] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
ASSIGN (versionsMessage, ASSIGN (versionsMessage,
[SOGoMAPIFSMessage objectWithName: @"versions.plist" [SOGoMAPIFSMessage objectWithName: @"versions.plist"
inContainer: propsFolder]); inContainer: propsFolder]);
@ -515,7 +515,10 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
[searchQualifier autorelease]; [searchQualifier autorelease];
} }
else else
searchQualifier = [self nonDeletedQualifier]; {
lastModseqNbr = 0;
searchQualifier = [self nonDeletedQualifier];
}
uids = [sogoObject fetchUIDsMatchingQualifier: searchQualifier uids = [sogoObject fetchUIDsMatchingQualifier: searchQualifier
sortOrdering: nil]; sortOrdering: nil];
@ -723,7 +726,7 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
NSArray *deletedKeys, *deletedUIDs; NSArray *deletedKeys, *deletedUIDs;
NSNumber *changeNumNbr; NSNumber *changeNumNbr;
uint64_t modseq; uint64_t modseq;
NSDictionary *versionProperties, *status; NSDictionary *versionProperties; // , *status;
NSMutableDictionary *messages, *mapping; NSMutableDictionary *messages, *mapping;
NSNumber *newChangeNumNbr; // , *highestModseq; NSNumber *newChangeNumNbr; // , *highestModseq;
uint64_t newChangeNum; uint64_t newChangeNum;
@ -736,9 +739,9 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
unsignedLongLongValue]; unsignedLongLongValue];
if (modseq > 0) if (modseq > 0)
{ {
status // status
= [sogoObject // = [sogoObject
statusForFlags: [NSArray arrayWithObject: @"HIGHESTMODSEQ"]]; // statusForFlags: [NSArray arrayWithObject: @"HIGHESTMODSEQ"]];
// highestModseq = [status objectForKey: @"highestmodseq"]; // highestModseq = [status objectForKey: @"highestmodseq"];
versionProperties = [versionsMessage properties]; versionProperties = [versionsMessage properties];
@ -943,7 +946,10 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
// //
v = [[[result objectForKey: @"RawResponse"] objectForKey: @"ResponseResult"] objectForKey: @"flag"]; v = [[[result objectForKey: @"RawResponse"] objectForKey: @"ResponseResult"] objectForKey: @"flag"];
if (v) if (v)
_parseCOPYUID (v, &destUIDs); {
destUIDs = nil;
_parseCOPYUID (v, &destUIDs);
}
else else
{ {
/* FIXME: this may fail if new messages are appended to the folder /* FIXME: this may fail if new messages are appended to the folder