SF.net SVN: geany: [2576] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue May 13 17:30:40 UTC 2008
Revision: 2576
http://geany.svn.sourceforge.net/geany/?rev=2576&view=rev
Author: ntrel
Date: 2008-05-13 10:30:28 -0700 (Tue, 13 May 2008)
Log Message:
-----------
Create ~/.geany/templates/files directory if it doesn't exist.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/templates.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-05-13 17:18:14 UTC (rev 2575)
+++ trunk/ChangeLog 2008-05-13 17:30:28 UTC (rev 2576)
@@ -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>
Modified: trunk/src/templates.c
===================================================================
--- trunk/src/templates.c 2008-05-13 17:18:14 UTC (rev 2575)
+++ trunk/src/templates.c 2008-05-13 17:30:28 UTC (rev 2576)
@@ -435,13 +435,17 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list