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 06fea7e..b75f349 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 7322609..4651705 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 49efd74..cce1695 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