Create ~/.geany/templates/files directory if it doesn't exist.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2576 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
bd92df27f5
commit
b39f7b1276
@ -7,6 +7,8 @@
|
||||
underneath filetype templates in the New with Template menu.
|
||||
Add ui_menu_item_get_text().
|
||||
Make utils_string_replace_all() ignore empty haystacks.
|
||||
* src/templates.c:
|
||||
Create ~/.geany/templates/files directory if it doesn't exist.
|
||||
|
||||
|
||||
2008-05-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
|
||||
@ -435,13 +435,17 @@ static gboolean add_custom_template_items(void)
|
||||
gchar *path = g_build_path(G_DIR_SEPARATOR_S, app->configdir, GEANY_TEMPLATES_SUBDIR,
|
||||
"files", NULL);
|
||||
GSList *list = utils_get_file_list(path, NULL, NULL);
|
||||
gboolean ret = list != NULL;
|
||||
|
||||
if (list == NULL)
|
||||
{
|
||||
utils_mkdir(path, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
g_slist_foreach(list, add_file_item, NULL);
|
||||
g_slist_foreach(list, (GFunc) g_free, NULL);
|
||||
g_slist_free(list);
|
||||
g_free(path);
|
||||
return ret;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user