diff --git a/ChangeLog b/ChangeLog index 2ca4d37de..a1c98f32e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-01-24 Wolfgang Sourdeau + + * UI/MailPartViewers/UIxMailPartViewer.m ([UIxMailPartViewer + -pathToAttachment]): in the case where the client object is not a + mail body part (when the message IS the attachment), we append 0 + to generate the url, instead of the filename. + 2008-01-22 Wolfgang Sourdeau * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/UI/MailPartViewers/UIxMailPartViewer.m b/UI/MailPartViewers/UIxMailPartViewer.m index 96b9e50a6..4f3a177fb 100644 --- a/UI/MailPartViewers/UIxMailPartViewer.m +++ b/UI/MailPartViewers/UIxMailPartViewer.m @@ -303,7 +303,7 @@ if (![url hasSuffix: @"/"]) url = [url stringByAppendingString: @"/"]; - /* if we get a message with an image/* or application/* + /* if we get a message with an image-* or application-* Content-Type, we must generate a 'fake' part since our decoded mail won't have any. Also see SOGoMailBodyPart: -fetchBLOB and SOGoMailObject: -lookupImap4BodyPartKey: inContext for @@ -343,7 +343,7 @@ - (NSString *) pathToAttachment { NSMutableString *url; - NSString *s; + NSString *s, *attachment; SOGoMailBodyPart *bodyPart; bodyPart = [self clientPart]; @@ -353,7 +353,11 @@ [url appendString: @"/"]; // s = [[self partPath] componentsJoinedByString: @"/"]; - [url appendString: [self _filenameForAttachment: bodyPart]]; + if ([bodyPart isKindOfClass: [SOGoMailBodyPart class]]) + attachment = [self _filenameForAttachment: bodyPart]; + else + attachment = @"0"; + [url appendString: attachment]; return url; } diff --git a/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox b/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox index 701eef9d4..e6a9771d0 100644 --- a/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox +++ b/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox @@ -206,5 +206,5 @@

--> -
+