- read $sysconfdir/mime.types in addition (fixes bug #6197 except not with an option)
[apps/madmutt.git] / sendlib.c
index 7369e84..e47825c 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -892,7 +892,7 @@ int mutt_lookup_mime_type (BODY * att, const char *path)
 
   szf = str_len (path);
 
-  for (count = 0; count < 3; count++) {
+  for (count = 0; count < 4; count++) {
     /*
      * can't use strtok() because we use it in an inner loop below, so use
      * a switch statement here instead.
@@ -907,6 +907,9 @@ int mutt_lookup_mime_type (BODY * att, const char *path)
     case 2:
       strfcpy (buf, PKGDATADIR "/mime.types", sizeof (buf));
       break;
+    case 3:
+      strfcpy (buf, SYSCONFDIR "/mime.types", sizeof (buf));
+      break;
     default:
       debug_print (1, ("Internal error, count = %d.\n", count));
       goto bye;                 /* shouldn't happen */