diff --git a/ChangeLog b/ChangeLog index 0eb4d61e93..d654fee3a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-08 Morten Welinder + + * gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder, + get_icon_type, filename_get_info): Protect errno. + 2004-03-08 Marco Pesenti Gritti * gtk/gtkentry.c: (gtk_entry_completion_key_press): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0eb4d61e93..d654fee3a8 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-03-08 Morten Welinder + + * gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder, + get_icon_type, filename_get_info): Protect errno. + 2004-03-08 Marco Pesenti Gritti * gtk/gtkentry.c: (gtk_entry_completion_key_press): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 0eb4d61e93..d654fee3a8 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2004-03-08 Morten Welinder + + * gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder, + get_icon_type, filename_get_info): Protect errno. + 2004-03-08 Marco Pesenti Gritti * gtk/gtkentry.c: (gtk_entry_completion_key_press): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0eb4d61e93..d654fee3a8 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-03-08 Morten Welinder + + * gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder, + get_icon_type, filename_get_info): Protect errno. + 2004-03-08 Marco Pesenti Gritti * gtk/gtkentry.c: (gtk_entry_completion_key_press): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0eb4d61e93..d654fee3a8 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-03-08 Morten Welinder + + * gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder, + get_icon_type, filename_get_info): Protect errno. + 2004-03-08 Marco Pesenti Gritti * gtk/gtkentry.c: (gtk_entry_completion_key_press): diff --git a/gtk/gtkfilesystemunix.c b/gtk/gtkfilesystemunix.c index 9f9c9ebb16..5cffce9374 100644 --- a/gtk/gtkfilesystemunix.c +++ b/gtk/gtkfilesystemunix.c @@ -378,13 +378,14 @@ gtk_file_system_unix_create_folder (GtkFileSystem *file_system, if (!result) { + int save_errno = errno; gchar *filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); g_set_error (error, GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR_NONEXISTENT, _("error creating directory '%s': %s"), filename_utf8 ? filename_utf8 : "???", - g_strerror (errno)); + g_strerror (save_errno)); g_free (filename_utf8); return FALSE; } @@ -466,13 +467,14 @@ get_icon_type (const char *filename, if (stat (filename, &statbuf) != 0 && lstat (filename, &statbuf) != 0) { + int save_errno = errno; gchar *filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); g_set_error (error, GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR_NONEXISTENT, _("error getting information for '%s': %s"), filename_utf8 ? filename_utf8 : "???", - g_strerror (errno)); + g_strerror (save_errno)); g_free (filename_utf8); return ICON_NONE; @@ -1389,13 +1391,14 @@ filename_get_info (const gchar *filename, stat (filename, &statbuf) != 0 && lstat (filename, &statbuf) != 0) { + int save_errno = errno; gchar *filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); g_set_error (error, GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR_NONEXISTENT, _("error getting information for '%s': %s"), filename_utf8 ? filename_utf8 : "???", - g_strerror (errno)); + g_strerror (save_errno)); g_free (filename_utf8); return NULL;