diff options
-rw-r--r-- | calendar/ChangeLog | 3 | ||||
-rw-r--r-- | calendar/gui/e-memo-table.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 741ba079f1..01ea05e6f3 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -7,7 +7,8 @@ * gui/e-cal-list-view.c * gui/e-calendar-table.c * gui/e-calendar-view.c - * gui/e-itip-control.c: Use gstdio wrappers. + * gui/e-itip-control.c + * gui/e-memo-table.c: Use gstdio wrappers. * gui/e-cal-model-tasks.c * gui/e-meeting-store.c: Use e_util_utf8_strcasecmp() to do diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index a720ffbe09..bd14f3cbee 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -34,6 +34,8 @@ #include <sys/stat.h> #include <unistd.h> +#include <glib.h> +#include <glib/gstdio.h> #include <gnome.h> #include <widgets/misc/e-gui-utils.h> #include <table/e-cell-checkbox.h> @@ -749,7 +751,7 @@ e_memo_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data) return; } - file = fopen (filename, "w"); + file = g_fopen (filename, "w"); if (file == NULL) { g_warning ("Couldn't save item"); return; @@ -969,7 +971,7 @@ e_memo_table_load_state (EMemoTable *memo_table, g_return_if_fail (E_IS_MEMO_TABLE (memo_table)); - if (stat (filename, &st) == 0 && st.st_size > 0 + if (g_stat (filename, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) { e_table_load_state (e_table_scrolled_get_table (E_TABLE_SCROLLED (memo_table->etable)), filename); } |