mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-19 20:28:32 +00:00
Fix attachment path when inside multiple parts
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user