Fix attachment filename with no extension

pull/217/head
Francis Lachapelle 2016-06-22 16:35:05 -04:00
parent bfab819a7e
commit 1e458a922b
2 changed files with 7 additions and 1 deletions

6
NEWS
View File

@ -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)
------------------

View File

@ -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"],