diff --git a/ChangeLog b/ChangeLog index e331adf1..3de5054d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ Fix loading custom filetype settings (e.g. default extension). Add note about using GeanyFiletype pointer instead of filetype_id for function arguments. + * src/filetypes.c: + Prevent adding entries for both system and user custom filetype + files. 2009-08-11 Nick Treleaven diff --git a/src/filetypes.c b/src/filetypes.c index 7ad1af87..79f73a50 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -670,6 +670,9 @@ static void add_custom_filetype(const gchar *filename) *dot = 0x0; + if (g_hash_table_lookup(filetypes_hash, fn)) + return; + geany_debug("Adding filetype %s.", fn); ft = filetype_new(); ft->name = g_strdup(fn);