From 3c1bb5f1d8c6a91388cf931d78167306430e4f60 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 25 Oct 2007 15:28:06 +0000 Subject: [PATCH] Monotone-Parent: a8160f433740ec8b2a14452d63e845319427b8a9 Monotone-Revision: 6942fad37af1688fabf9fedce658eafff7ae9cf7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-25T15:28:06 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ SoObjects/Mailer/SOGoMailObject+Draft.m | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45ee2293e..20e432708 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-10-25 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject + -fetchFileAttachmentKeys]): fetch the attachment encoding as well. + * SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject -stringForData:_datapartInfo:_info]): simplified by invoking -bodyDataFromEncoding: from our new NSData category methods. diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index 18e6e0f2f..ebe7e04a7 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -232,20 +232,22 @@ intoArray: (NSMutableArray *) keys withPath: (NSString *) path { - NSDictionary *parameters, *currentFile; + NSDictionary *disposition, *currentFile; NSString *filename, *mimeType; - parameters = [[part objectForKey: @"disposition"] - objectForKey: @"parameterList"]; - if (parameters) + disposition = [part objectForKey: @"disposition"]; + filename = [[disposition objectForKey: @"parameterList"] + objectForKey: @"filename"]; + if (filename) { - filename = [parameters objectForKey: @"filename"]; mimeType = [NSString stringWithFormat: @"%@/%@", [part objectForKey: @"type"], [part objectForKey: @"subtype"]]; currentFile = [NSDictionary dictionaryWithObjectsAndKeys: filename, @"filename", [mimeType lowercaseString], @"mimetype", + [part + objectForKey: @"encoding"], @"encoding", path, @"path", nil]; [keys addObject: currentFile]; }