Prevent adding entries for both system and user custom filetype

files.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@4072 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-08-12 15:12:50 +00:00
parent 1665bc61bc
commit 858a97e90a
2 changed files with 6 additions and 0 deletions

View File

@ -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 <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -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);