Public bug reported: When the encoded filename happens to contain a slash (or several), munpack saves the attachment in a directory hierarchy:
$ munpack 1.eml tempdesc.txt: File exists =XGBKXBXu9i4tDQ3Msba09/H6deosaguZG9jX= (application/msword) $ ls -l -rw-rw-r-- 1 nico nico 20700 1.eml drwxrwxr-x 2 nico nico 4096 =XGBKXBXu9i4tDQ3Msba09 $ ls -l =XGBKXBXu9i4tDQ3Msba09/ -rw------- 1 nico nico 13824 H6deosaguZG9jX= The best fix would be to decode the filename too. In this example =XGBKXBXu9i4tDQ3Msba09/H6deosaguZG9jX= can be decoded to 回复472期舆情专报.doc as shown by the command below: $ perl -C -E 'use Encode; say Encode::decode("MIME-Header","=?GBK?B?u9i4tDQ3Msba09/H6deosaguZG9j?=");' 回复472期舆情专报.doc ** Affects: mpack (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1587320 Title: munpack randomly saves attachment in folder hierarchy instead of single file To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mpack/+bug/1587320/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs