mirror of https://github.com/M66B/FairEmail.git
Enable decoding attachment filenames again
This commit is contained in:
parent
22fe9c6b77
commit
834f9c6570
|
@ -2489,14 +2489,14 @@ public class MessageHelper {
|
||||||
// From the body structure:
|
// From the body structure:
|
||||||
// 1. disposition filename
|
// 1. disposition filename
|
||||||
// 2. content type name
|
// 2. content type name
|
||||||
filename = part.getFileName();
|
filename = part.getFileName(); // IMAPBodyPart/BODYSTRUCTURE
|
||||||
if (filename != null) {
|
if (filename != null) {
|
||||||
// https://tools.ietf.org/html/rfc2231
|
// https://tools.ietf.org/html/rfc2231
|
||||||
// http://kb.mozillazine.org/Attachments_renamed
|
// http://kb.mozillazine.org/Attachments_renamed
|
||||||
// https://blog.nodemailer.com/2017/01/27/the-mess-that-is-attachment-filenames/
|
// https://blog.nodemailer.com/2017/01/27/the-mess-that-is-attachment-filenames/
|
||||||
int q1 = filename.indexOf('\'');
|
int q1 = filename.indexOf('\'');
|
||||||
int q2 = filename.indexOf('\'', q1 + 1);
|
int q2 = filename.indexOf('\'', q1 + 1);
|
||||||
if (q1 >= 0 && q2 > 0 && false) {
|
if (q1 >= 0 && q2 > 0) {
|
||||||
try {
|
try {
|
||||||
String charset = filename.substring(0, q1);
|
String charset = filename.substring(0, q1);
|
||||||
String language = filename.substring(q1 + 1, q2);
|
String language = filename.substring(q1 + 1, q2);
|
||||||
|
|
Loading…
Reference in New Issue