Revision: 4262 http://geany.svn.sourceforge.net/geany/?rev=4262&view=rev Author: ntrel Date: 2009-09-29 11:31:25 +0000 (Tue, 29 Sep 2009)
Log Message: ----------- Use foreach_dir() instead of utils_get_file_list() as list is resorted anyway.
Modified Paths: -------------- trunk/src/templates.c
Modified: trunk/src/templates.c =================================================================== --- trunk/src/templates.c 2009-09-29 11:07:10 UTC (rev 4261) +++ trunk/src/templates.c 2009-09-29 11:31:25 UTC (rev 4262) @@ -529,10 +529,19 @@ { 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; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.