Skip to content

Commit

Permalink
fix(filename): Fixed filename decoding for the download method
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Feb 12, 2024
1 parent b1a6efb commit 68a8159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/imap-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,7 @@ class ImapFlow extends EventEmitter {
let filename = disposition.params.filename || contentType.params.name || false;
if (filename) {
try {
filename = this.libmime.decodeWords(filename);
filename = libmime.decodeWords(filename);
} catch (err) {
// failed to parse filename, keep as is (most probably an unknown charset is used)
}
Expand Down Expand Up @@ -2780,7 +2780,7 @@ class ImapFlow extends EventEmitter {
let filename = disposition.params.filename || contentType.params.name || false;
if (filename) {
try {
filename = this.libmime.decodeWords(filename);
filename = libmime.decodeWords(filename);
} catch (err) {
// failed to parse filename, keep as is (most probably an unknown charset is used)
}
Expand Down

0 comments on commit 68a8159

Please sign in to comment.