See ChangeLog
Monotone-Parent: 5a7e429f43453ecb7e1ca7ac57a0e13f01a7d0be Monotone-Revision: bd604d08baed0cf7905c0c78a513a7e7a9621223 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-11-26T11:51:52 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
a66386c85a
commit
90f4187c98
|
@ -1,3 +1,12 @@
|
|||
2009-11-26 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailObject+Draft.m
|
||||
(_fetchFileAttachmentKey:intoArray:withPath:): we
|
||||
try to also use basic types (application/, audio/, ...)
|
||||
when forwarding a mail with attachments and no
|
||||
Content-Disposition header (or filename) was found. This
|
||||
avoid losing attachments when forwarding mails.
|
||||
|
||||
2009-11-24 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/NSData+Mail.m (-decodedString): renamed from
|
||||
|
|
|
@ -253,11 +253,13 @@
|
|||
disposition = [part objectForKey: @"disposition"];
|
||||
filename = [[disposition objectForKey: @"parameterList"]
|
||||
objectForKey: @"filename"];
|
||||
|
||||
mimeType = [NSString stringWithFormat: @"%@/%@",
|
||||
[part objectForKey: @"type"],
|
||||
[part objectForKey: @"subtype"]];
|
||||
|
||||
if (filename)
|
||||
{
|
||||
mimeType = [NSString stringWithFormat: @"%@/%@",
|
||||
[part objectForKey: @"type"],
|
||||
[part objectForKey: @"subtype"]];
|
||||
currentFile = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
filename, @"filename",
|
||||
[mimeType lowercaseString], @"mimetype",
|
||||
|
@ -265,6 +267,26 @@
|
|||
[part objectForKey: @"encoding"], @"encoding", nil];
|
||||
[keys addObject: currentFile];
|
||||
}
|
||||
else
|
||||
{
|
||||
// We might end up here because of MUA that actually strips the
|
||||
// Content-Disposition (and thus, the filename) when mails containing
|
||||
// attachments have been forwarded. Thunderbird (2.x) does just that
|
||||
// when forwarding mails with images attached to them (using cid:...).
|
||||
if ([mimeType hasPrefix: @"application/"] ||
|
||||
[mimeType hasPrefix: @"audio/"] ||
|
||||
[mimeType hasPrefix: @"image/"] ||
|
||||
[mimeType hasPrefix: @"video/"])
|
||||
{
|
||||
currentFile = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSString stringWithFormat: @"unkown_%@", path], @"filename",
|
||||
[mimeType lowercaseString], @"mimetype",
|
||||
path, @"path",
|
||||
[part objectForKey: @"encoding"], @"encoding",
|
||||
nil];
|
||||
[keys addObject: currentFile];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) _fetchFileAttachmentKeysInPart: (NSDictionary *) part
|
||||
|
|
|
@ -536,7 +536,7 @@ _xmlCharsetForCharset (NSString *charset)
|
|||
}
|
||||
[dump appendFormat: @"--- end ---\n"];
|
||||
|
||||
NSLog (dump);
|
||||
NSLog(dump);
|
||||
[dump release];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue