don't ask me, I will not comment on it
authorVolker Birk <vb@pep-project.org>
Thu, 22 Oct 2015 15:47:40 +0200
changeset 377ef2b8046cb3c
parent 376 295bb70722ef
child 378 3da8f04010b9
don't ask me, I will not comment on it
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Oct 14 01:58:52 2015 +0200
     1.2 +++ b/src/message_api.c	Thu Oct 22 15:47:40 2015 +0200
     1.3 @@ -775,7 +775,17 @@
     1.4      for (bl = msg->attachments; bl && bl->value; bl = bl->next) {
     1.5          assert(bl && bl->value && bl->size);
     1.6  
     1.7 -        if (bl->mime_type == NULL ||
     1.8 +        // workaround for Apple Mail bugs
     1.9 +        if (is_mime_type(bl, "application/x-apple-msg-attachment")) {
    1.10 +            if (is_fileending(bl, ".asc")) {
    1.11 +                if (strlen(bl->filename) == 14 &&
    1.12 +                        bl->filename[0] == '0' && bl->filename[1] == 'x')
    1.13 +                    import_key(session, bl->value, bl->size);
    1.14 +                else if (strlen(bl->filename) == 12)
    1.15 +                    import_key(session, bl->value, bl->size);
    1.16 +            }
    1.17 +        }
    1.18 +        else if (bl->mime_type == NULL ||
    1.19                      is_mime_type(bl, "application/octet-stream")) {
    1.20              if (is_fileending(bl, ".pgp") || is_fileending(bl, ".gpg") ||
    1.21                      is_fileending(bl, ".key") || is_fileending(bl, ".asc"))