mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-25 05:26:14 +01:00
save errno to prevent it being clobbered by call to
2007-07-09 Ryan Lortie <desrt@desrt.ca> * glib/gfileutils.c (write_to_temp_file): save errno to prevent it being clobbered by call to g_filename_display_name(). Bug #453796. svn path=/trunk/; revision=5608
This commit is contained in:
parent
7a55a55fdc
commit
702549ddc1
@ -1,3 +1,8 @@
|
||||
2007-07-09 Ryan Lortie <desrt@desrt.ca>
|
||||
|
||||
* 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 <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Fix a small problem with
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user