From e5c03181ba3cd06f27e10677960575e44e7900a6 Mon Sep 17 00:00:00 2001 From: hiro Date: Mon, 8 Aug 2005 07:07:19 +0000 Subject: added wrappers for C library function that take pathname arguments. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@478 ee746299-78ed-0310-b773-934348b2243d --- src/template.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/template.c') diff --git a/src/template.c b/src/template.c index 9aafa09d..c2dc9b2e 100644 --- a/src/template.c +++ b/src/template.c @@ -40,7 +40,7 @@ static Template *template_load(gchar *filename) gchar buf[BUFFSIZE]; gint bytes_read; - if ((fp = fopen(filename, "rb")) == NULL) { + if ((fp = g_fopen(filename, "rb")) == NULL) { FILE_OP_ERROR(filename, "fopen"); return NULL; } @@ -136,7 +136,7 @@ GSList *template_read_config(void) filename = g_strconcat(path, G_DIR_SEPARATOR_S, de->d_name, NULL); - if (stat(filename, &s) != 0 || !S_ISREG(s.st_mode) ) { + if (g_stat(filename, &s) != 0 || !S_ISREG(s.st_mode) ) { debug_print("%s:%d %s is not an ordinary file\n", __FILE__, __LINE__, filename); continue; @@ -186,7 +186,7 @@ void template_write_config(GSList *tmpl_list) filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(tmpl_num), NULL); - if ((fp = fopen(filename, "wb")) == NULL) { + if ((fp = g_fopen(filename, "wb")) == NULL) { FILE_OP_ERROR(filename, "fopen"); g_free(filename); return; -- cgit v1.2.3