3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/mailreaders/claws-mail/mime.patch
Bryan Gardiner 268b4d5cfe
claws-mail: fix attachment MIME type detection
Adds support for shared-mime-info to Claws, to fix attachments in
outgoing messages always having MIME type application/octet-stream
because Claws doesn't know where to look, instead complaining:

/nix/store/...-claws-mail-3.11.1/etc/mime.types: fopen: No such file or directory

Moreover, Claws relies on incoming MIME types for knowing when e.g. to
display an attached image, so sending application/octet-stream
unnecessarily is bad.

Tested against release-15.09.
2015-09-18 04:52:44 -07:00

15 lines
514 B
Diff

--- a/src/procmime.c 2015-09-18 04:03:11.767654094 -0700
+++ b/src/procmime.c 2015-09-18 04:08:38.834503034 -0700
@@ -1196,11 +1196,7 @@
if (mime_type_list)
return mime_type_list;
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
if ((fp = procmime_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL)
-#else
- if ((fp = procmime_fopen("/usr/share/mime/globs", "rb")) == NULL)
-#endif
{
fp_is_glob_file = FALSE;
if ((fp = procmime_fopen("/etc/mime.types", "rb")) == NULL) {