From 1e458a922bd63e04eb7f8a82dac483a8433f6595 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 22 Jun 2016 16:35:05 -0400 Subject: [PATCH] Fix attachment filename with no extension --- NEWS | 6 ++++++ UI/MailPartViewers/UIxMailPartViewer.m | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index eb7694bbd..6aea58dc4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +3.1.4 (2016-MM-DD) +------------------ + +Bug fixes + - [web] fixed crash when an attachment filename has no extension + 3.1.3 (2016-06-22) ------------------ diff --git a/UI/MailPartViewers/UIxMailPartViewer.m b/UI/MailPartViewers/UIxMailPartViewer.m index dcc9c4098..d65c8d601 100644 --- a/UI/MailPartViewers/UIxMailPartViewer.m +++ b/UI/MailPartViewers/UIxMailPartViewer.m @@ -282,7 +282,7 @@ if ([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 *)[filename stringByReplacingString: @"/" withString: @"-"]; + filename = [NSMutableString stringWithString: [filename stringByReplacingString: @"/" withString: @"-"]]; else [filename appendFormat: @"%@-%@", [self labelForKey: @"Untitled"],