diff --git a/ChangeLog b/ChangeLog index f2718f5cf..7f99f0214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-09 Ryan Lortie + + * glib/gfileutils.c (write_to_temp_file): save errno to prevent it + being clobbered by call to g_filename_display_name(). Bug #453796. + 2007-07-09 Matthias Clasen * m4macros/glib-gettext.m4: Fix a small problem with diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 7c271bb99..040ed7bc0 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -920,11 +920,12 @@ write_to_temp_file (const gchar *contents, errno = 0; fd = create_temp_file (tmp_name, 0666); + save_errno = errno; + display_name = g_filename_display_name (tmp_name); if (fd == -1) { - save_errno = errno; g_set_error (err, G_FILE_ERROR, g_file_error_from_errno (save_errno),