nixpkgs/pkgs/by-name/cl/claws-mail/mime.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

29 lines
849 B
Diff

diff --git a/src/procmime.c b/src/procmime.c
index bd3239e..06a3b26 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -1144,20 +1144,16 @@ GList *procmime_get_mime_type_list(void)
MimeType *mime_type;
gboolean fp_is_glob_file = TRUE;
if (mime_type_list)
return mime_type_list;
-
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
- if ((fp = claws_fopen(DATAROOTDIR "/mime/globs", "rb")) == NULL)
-#else
- if ((fp = claws_fopen("/usr/share/mime/globs", "rb")) == NULL)
-#endif
+
+ if ((fp = claws_fopen("@MIMEROOTDIR@/mime/globs", "rb")) == NULL)
{
fp_is_glob_file = FALSE;
if ((fp = claws_fopen("/etc/mime.types", "rb")) == NULL) {
if ((fp = claws_fopen(SYSCONFDIR "/mime.types", "rb"))
== NULL) {
FILE_OP_ERROR(SYSCONFDIR "/mime.types",
"claws_fopen");
return NULL;
}