RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Attachments with illegal filenames are not saved correctly #177

Closed logique1 closed 2 years ago

logique1 commented 2 years ago

When the filename of the attachment has an illegal character it will save a zero size file with a space at the end and that file cannot be easily removed. For example: Attached file name is "Invoice: invoice.pdf" it will save a file named "invoice " Suggest code to change illegal character to a - (dash)

RealRaven2000 commented 2 years ago

When the filename of the attachment has an illegal character it will save a zero size file with a space at the end and that file cannot be easily removed. For example: Attached file name is Invoice: invoice.pdf it will save a file named "invoice " Suggest code to change illegal character to a - (dash)

@logique1

I am currently working on a fix, just don't know how to generate an attachment with an illegal filename, can you send me one? Forward it to thunderbirddaily@gmail.com please!

If you could prefix the subject line with [filtaquilla] that would be helpful!

RealRaven2000 commented 2 years ago

PS: if you can add an attachment with diacritics in the file name this may be helpful as well. I am using my routine _sanitizeName() that is also used when saving mails as files. It does replace diacritics and other special characters with similar sounding /looking characters, and also replaces illegal characters with -.

filtaquilla-3.5.1pre20.zip

(untested prerelease version, can be installed by downloading the zip file and dragging it into Thunderbird Add-ons Manager without unpacking contents).

RealRaven2000 commented 2 years ago

The exported file name was missing "." here is a corrected version.

filtaquilla-3.5.1pre27.zip

problems - when I try to enumerate the attachments using MimeMessage.allAttachments it seems to omit attachments of type "eml" and only saves the pdf one.

RealRaven2000 commented 2 years ago

Don't forget to download zip file and drag into Thunderbird Add-ons Manager to install. Also you must restart Thunderbird (old filter actions cannot be removed, so only restarting will add the new version)

RealRaven2000 commented 2 years ago

Included in release 3.6, published on 17/10.