From b490620975005ccfc65bd92fbe23fe8dc3a1427d Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 8 Nov 2015 11:41:15 +0000 Subject: [PATCH] find correct mime type of files with no suffix, e.g. Makefile Patch by Blatinox. --- AUTHORS | 1 + src/gtk/authors.h | 1 + src/procmime.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/AUTHORS b/AUTHORS index 06fea7ee1..b75f349b9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -306,3 +306,4 @@ contributors (in addition to the above; based on Changelog) Daniel Jakots Mikhail Kurinnoi Arthur Huillet + Blatinox diff --git a/src/gtk/authors.h b/src/gtk/authors.h index 732260989..46517058e 100644 --- a/src/gtk/authors.h +++ b/src/gtk/authors.h @@ -94,6 +94,7 @@ static char *CONTRIBS_LIST[] = { "Sébastien Bigaret", "Laurent Bigonville", "Jean-Luc Biord", +"Blatinox", "Pavlo Bohmat", "H. Merijn Brand", "Eugene Brevdo", diff --git a/src/procmime.c b/src/procmime.c index 49efd7478..cce169580 100644 --- a/src/procmime.c +++ b/src/procmime.c @@ -1104,6 +1104,8 @@ gchar *procmime_get_mime_type(const gchar *filename) base = g_path_get_basename(filename); if ((p = strrchr(base, '.')) != NULL) ext = g_utf8_strdown(p + 1, -1); + else + ext = g_utf8_strdown(base, -1); g_free(base); #ifndef G_OS_WIN32 -- 2.25.1