aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-01-14 03:01:53 +0800
committerMilan Crha <mcrha@redhat.com>2010-01-14 03:01:53 +0800
commit4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6 (patch)
treeb1cc0dc426b767d9e1421512563e034f01971ad9 /composer
parent8b13842910a5f006d31cd347e7c5af265a4768ce (diff)
downloadgsoc2013-evolution-4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6.tar
gsoc2013-evolution-4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6.tar.gz
gsoc2013-evolution-4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6.tar.bz2
gsoc2013-evolution-4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6.tar.lz
gsoc2013-evolution-4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6.tar.xz
gsoc2013-evolution-4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6.tar.zst
gsoc2013-evolution-4d114e022ca38e7aeb6cc2cc3715f7dca69c82a6.zip
Bug #606874 - mktemp disabled in latest glibc-2.11.90-8
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-autosave.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/composer/e-composer-autosave.c b/composer/e-composer-autosave.c
index a28986625d..002f6d0028 100644
--- a/composer/e-composer-autosave.c
+++ b/composer/e-composer-autosave.c
@@ -91,6 +91,7 @@ static gboolean
composer_autosave_state_open (AutosaveState *state)
{
gchar *path;
+ gint fd;
if (state->file != NULL)
return TRUE;
@@ -100,13 +101,16 @@ composer_autosave_state_open (AutosaveState *state)
/* Since GIO doesn't have support for creating temporary files
* from a template (and in a given directory), we have to use
- * mktemp(), which brings a small risk of overwriting another
+ * g_mkstemp(), which brings a small risk of overwriting another
* autosave file. The risk is, however, miniscule. */
- if (mktemp (path) == NULL) {
+ fd = g_mkstemp (path);
+ if (fd == -1) {
g_free (path);
return FALSE;
}
+ close (fd);
+
/* Create the GFile */
state->file = g_file_new_for_path (path);
g_free (path);