Enable decoding attachment filenames again

This commit is contained in:
M66B 2021-02-07 09:01:13 +01:00
parent 22fe9c6b77
commit 834f9c6570
1 changed files with 2 additions and 2 deletions

View File

@ -2489,14 +2489,14 @@ public class MessageHelper {
// From the body structure:
// 1. disposition filename
// 2. content type name
filename = part.getFileName();
filename = part.getFileName(); // IMAPBodyPart/BODYSTRUCTURE
if (filename != null) {
// https://tools.ietf.org/html/rfc2231
// http://kb.mozillazine.org/Attachments_renamed
// https://blog.nodemailer.com/2017/01/27/the-mess-that-is-attachment-filenames/
int q1 = filename.indexOf('\'');
int q2 = filename.indexOf('\'', q1 + 1);
if (q1 >= 0 && q2 > 0 && false) {
if (q1 >= 0 && q2 > 0) {
try {
String charset = filename.substring(0, q1);
String language = filename.substring(q1 + 1, q2);