Fix attachment path when inside multiple parts
parent
b9f4947f8a
commit
ed3f794226
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ Enhancements
|
|||
-
|
||||
|
||||
Bug fixes
|
||||
- [web] fixed attachment path when inside multiple body parts
|
||||
- [core] cherry-picked comma escaping fix from v2 (#3296)
|
||||
|
||||
3.2.8 (2017-03-24)
|
||||
|
|
|
@ -340,12 +340,21 @@
|
|||
|
||||
- (NSString *) pathToAttachmentFromMessage
|
||||
{
|
||||
NSMutableArray *parts;
|
||||
SOGoMailBodyPart *bodyPart;
|
||||
|
||||
bodyPart = [self clientPart];
|
||||
|
||||
if ([bodyPart isKindOfClass: [SOGoMailBodyPart class]])
|
||||
return [NSString stringWithFormat: @"%@/%@", [bodyPart nameInContainer], [self _filenameForAttachment: bodyPart]];
|
||||
{
|
||||
parts = [NSMutableArray arrayWithObject: [self _filenameForAttachment: bodyPart]];
|
||||
do
|
||||
{
|
||||
[parts insertObject: [bodyPart nameInContainer] atIndex: 0];
|
||||
bodyPart = [bodyPart container];
|
||||
}
|
||||
while ([bodyPart isKindOfClass: [SOGoMailBodyPart class]]);
|
||||
return [parts componentsJoinedByString: @"/"];
|
||||
}
|
||||
|
||||
return @"0";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue