From a6900ed88b1348ff029fc26496bc4cbf0f6c45bc Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 24 Feb 2011 20:56:44 +0000 Subject: [PATCH] Monotone-Parent: 4fff03b9e04c6c05d2e2e0e2fea66011040642e4 Monotone-Revision: a811cbd171c64445b4b32261e56c4b5085787de0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-24T20:56:44 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ OpenChange/MAPIStoreMailMessage.m | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82c31a3ec..582902b49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-02-24 Wolfgang Sourdeau + * OpenChange/MAPIStoreMailMessage.m + (_fetchAttachmentPartsInBodyInfo:withPrefix:): detect attachment + parts based on the existence of the "filename" info parameter. + * OpenChange/MAPIStoreTable.m: refactored class to be used as an accessor on MAPIStoreFolder or other MAPIStoreObject derivatives based on a defined set of methods. Now strictly handle the sorting diff --git a/OpenChange/MAPIStoreMailMessage.m b/OpenChange/MAPIStoreMailMessage.m index 56c7b3322..2010a369d 100644 --- a/OpenChange/MAPIStoreMailMessage.m +++ b/OpenChange/MAPIStoreMailMessage.m @@ -603,12 +603,12 @@ static Class NSExceptionK; withPrefix: (NSString *) keyPrefix { NSArray *parts; - NSString *dispType; + NSDictionary *parameters; NSUInteger count, max; - dispType = [[bodyInfo objectForKey: @"disposition"] - objectForKey: @"type"]; - if ([[dispType lowercaseString] isEqualToString: @"attachment"]) + parameters = [[bodyInfo objectForKey: @"disposition"] + objectForKey: @"parameterList"]; + if ([[parameters objectForKey: @"filename"] length] > 0) { if ([keyPrefix length] == 0) keyPrefix = @"0";