Kaydet (Commit) 8f7f5f95 authored tarafından Nick Treleaven's avatar Nick Treleaven

Use foreach_dir() instead of utils_get_file_list() as list is resorted anyway.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4262 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst e8d73228
......@@ -529,9 +529,18 @@ static gboolean add_custom_template_items(GtkWidget *toolbar_new_file_menu)
{
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);
GSList *list = NULL;
GDir *dir;
const gchar *fname;
if (list == NULL)
dir = g_dir_open(path, 0, NULL);
if (dir)
{
foreach_dir(fname, dir)
list = g_slist_append(list, g_strdup(fname));
g_dir_close(dir);
}
if (!dir || !list)
{
utils_mkdir(path, FALSE);
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment