# HG changeset patch # User Richard Laager # Date 1141868880 0 # Node ID 660916251ba81f9e61ee324e906c58b75e84d39b # Parent 0f3036e073b6ec5e109e5e9b485ca8a91f8d8d75 [gaim-migrate @ 15848] Use g_mkstemp() to create the temp file instead. This should work. I promise I'll test this in a minute when I'm done in the other tree. committer: Tailor Script diff -r 0f3036e073b6 -r 660916251ba8 src/log.c --- a/src/log.c Thu Mar 09 01:17:33 2006 +0000 +++ b/src/log.c Thu Mar 09 01:48:00 2006 +0000 @@ -1305,8 +1305,6 @@ time_t log_last_modified; FILE *index; FILE *file; - GError *error; - char *index_template; int index_fd; char *index_tmp; char buf[BUF_LONG]; @@ -1387,12 +1385,12 @@ return NULL; } - index_template = g_strdup_printf("%s.XXXXXX", pathstr); - if ((index_fd = g_file_open_tmp(index_template, &index_tmp, &error)) == -1) { + index_tmp = g_strdup_printf("%s.XXXXXX", pathstr); + if ((index_fd = g_mkstemp(index_tmp)) == -1) { gaim_debug_error("log", "Failed to open index temp file: %s\n", - error->message); - g_error_free(error); + strerror(errno)); g_free(pathstr); + g_free(index_tmp); index = NULL; } else { if ((index = fdopen(index_fd, "wb")) == NULL)