Fix path of single part message

pull/240/head
Francis Lachapelle 2018-02-13 08:54:53 -05:00
parent 2faf0411e4
commit 26095d6361
1 changed files with 7 additions and 3 deletions

View File

@ -336,10 +336,14 @@
if (![url hasSuffix: @"/"])
[url appendString: @"/"];
[url appendString: [[self partPath] componentsJoinedByString: @"/"]];
[url appendString: @"/"];
if ([self partPath])
{
[url appendString: [[self partPath] componentsJoinedByString: @"/"]];
[url appendString: @"/"];
}
if ([bodyPart isKindOfClass: [SOGoMailBodyPart class]])
if ([bodyPart isKindOfClass: [SOGoMailBodyPart class]] ||
[bodyPart isKindOfClass: [SOGoMailObject class]])
attachment = [self _filenameForAttachment: bodyPart];
else if ([[self decodedFlatContent] isKindOfClass: [NGMimeBodyPart class]])
attachment = [[[self decodedFlatContent] headerForKey: @"content-disposition"] filename];