From e0f4f1ba56d492b16bc333a943b96ef2f5ef1a76 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 29 Sep 2011 15:52:27 +0000 Subject: [PATCH] Monotone-Parent: bce92d5d3cf0a781944fc96a15b832a767285d0f Monotone-Revision: c4fba0dfa99628493a8d5c73f359b267fb922961 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-09-29T15:52:27 Monotone-Branch: ca.inverse.sogo --- OpenChange/MAPIStoreMailFolder.m | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/OpenChange/MAPIStoreMailFolder.m b/OpenChange/MAPIStoreMailFolder.m index 5e5f97d50..5b9ace633 100644 --- a/OpenChange/MAPIStoreMailFolder.m +++ b/OpenChange/MAPIStoreMailFolder.m @@ -132,11 +132,11 @@ static Class SOGoMailFolderK; - (id) initWithSOGoObject: (id) newSOGoObject inContainer: (MAPIStoreObject *) newContainer { - NSString *urlString; + // NSString *urlString; if ((self = [super initWithSOGoObject: newSOGoObject inContainer: newContainer])) { - urlString = [[self url] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; + // urlString = [[self url] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; ASSIGN (versionsMessage, [SOGoMAPIFSMessage objectWithName: @"versions.plist" inContainer: propsFolder]); @@ -515,7 +515,10 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) [searchQualifier autorelease]; } else - searchQualifier = [self nonDeletedQualifier]; + { + lastModseqNbr = 0; + searchQualifier = [self nonDeletedQualifier]; + } uids = [sogoObject fetchUIDsMatchingQualifier: searchQualifier sortOrdering: nil]; @@ -723,7 +726,7 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) NSArray *deletedKeys, *deletedUIDs; NSNumber *changeNumNbr; uint64_t modseq; - NSDictionary *versionProperties, *status; + NSDictionary *versionProperties; // , *status; NSMutableDictionary *messages, *mapping; NSNumber *newChangeNumNbr; // , *highestModseq; uint64_t newChangeNum; @@ -736,9 +739,9 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) unsignedLongLongValue]; if (modseq > 0) { - status - = [sogoObject - statusForFlags: [NSArray arrayWithObject: @"HIGHESTMODSEQ"]]; + // status + // = [sogoObject + // statusForFlags: [NSArray arrayWithObject: @"HIGHESTMODSEQ"]]; // highestModseq = [status objectForKey: @"highestmodseq"]; versionProperties = [versionsMessage properties]; @@ -943,7 +946,10 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP) // v = [[[result objectForKey: @"RawResponse"] objectForKey: @"ResponseResult"] objectForKey: @"flag"]; if (v) - _parseCOPYUID (v, &destUIDs); + { + destUIDs = nil; + _parseCOPYUID (v, &destUIDs); + } else { /* FIXME: this may fail if new messages are appended to the folder