diff --git a/UI/MailPartViewers/UIxMailPartViewer.m b/UI/MailPartViewers/UIxMailPartViewer.m index bb411e582..ab092394b 100644 --- a/UI/MailPartViewers/UIxMailPartViewer.m +++ b/UI/MailPartViewers/UIxMailPartViewer.m @@ -266,15 +266,14 @@ NSMutableString *filename; NSString *extension; - filename = [NSMutableString stringWithString: [self filename]]; - if ([filename length]) + if ([[self filename] length]) // We replace any slash by a dash since Apache won't allow encoded slashes by default. // See http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes - filename = [NSMutableString stringWithString: [filename stringByReplacingString: @"/" withString: @"-"]]; + filename = [NSMutableString stringWithString: [[self filename] stringByReplacingString: @"/" withString: @"-"]]; else - [filename appendFormat: @"%@-%@", - [self labelForKey: @"Untitled"], - [bodyPart nameInContainer]]; + filename = [NSMutableString stringWithFormat: @"%@-%@", + [self labelForKey: @"Untitled"], + [bodyPart nameInContainer]]; if (![[filename pathExtension] length]) {