find correct mime type of files with no suffix, e.g. Makefile
authorPaul <paul@claws-mail.org>
Sun, 8 Nov 2015 11:41:15 +0000 (11:41 +0000)
committerPaul <paul@claws-mail.org>
Sun, 8 Nov 2015 11:41:15 +0000 (11:41 +0000)
Patch by Blatinox.

AUTHORS
src/gtk/authors.h
src/procmime.c

diff --git a/AUTHORS b/AUTHORS
index 06fea7ee1291161a407ba568d3200912a4e7eda1..b75f349b9b6bac91c43e710ef3a32f8118e3940a 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -306,3 +306,4 @@ contributors (in addition to the above; based on Changelog)
        Daniel Jakots
        Mikhail Kurinnoi
        Arthur Huillet
+       Blatinox
index 732260989402f61355c90c6ddad0bb48bb85be88..46517058e912e30875df34faa027ee2e5830c581 100644 (file)
@@ -94,6 +94,7 @@ static char *CONTRIBS_LIST[] = {
 "Sébastien Bigaret",
 "Laurent Bigonville",
 "Jean-Luc Biord",
+"Blatinox",
 "Pavlo Bohmat",
 "H. Merijn Brand",
 "Eugene Brevdo",
index 49efd7478f7547f8fd262a9687e4f059ae4c8655..cce1695800896b3cf792c5893728ce915753f343 100644 (file)
@@ -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