The Adium spec explicitely says that the root directory of the theme should
end with ".AdiumMessageStyle".
https://bugzilla.gnome.org/show_bug.cgi?id=679332
{
gboolean ret;
gchar *file;
+ gchar **tmp;
+ const gchar *dir;
if (path[0] != '/')
return FALSE;
+ /* The directory has to be *.AdiumMessageStyle per the Adium spec */
+ tmp = g_strsplit (path, "/", 0);
+ if (tmp == NULL)
+ {
+ g_free (tmp);
+ return FALSE;
+ }
+
+ dir = tmp[g_strv_length (tmp) - 1];
+
+ if (!g_str_has_suffix (dir, ".AdiumMessageStyle"))
+ {
+ g_free (tmp);
+ return FALSE;
+ }
+
+ g_free (tmp);
+
/* The theme is not valid if there is no Info.plist */
file = g_build_filename (path, "Contents", "Info.plist",
NULL);