forked from AuroraMiddleware/gtk
Protect errno.
2004-03-08 Morten Welinder <terra@gnome.org> * gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder, get_icon_type, filename_get_info): Protect errno.
This commit is contained in:
parent
95a37fdf6b
commit
74a9f1d2f1
@ -1,3 +1,8 @@
|
||||
2004-03-08 Morten Welinder <terra@gnome.org>
|
||||
|
||||
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder,
|
||||
get_icon_type, filename_get_info): Protect errno.
|
||||
|
||||
2004-03-08 Marco Pesenti Gritti <marco@gnome.org>
|
||||
|
||||
* gtk/gtkentry.c: (gtk_entry_completion_key_press):
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-03-08 Morten Welinder <terra@gnome.org>
|
||||
|
||||
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder,
|
||||
get_icon_type, filename_get_info): Protect errno.
|
||||
|
||||
2004-03-08 Marco Pesenti Gritti <marco@gnome.org>
|
||||
|
||||
* gtk/gtkentry.c: (gtk_entry_completion_key_press):
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-03-08 Morten Welinder <terra@gnome.org>
|
||||
|
||||
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder,
|
||||
get_icon_type, filename_get_info): Protect errno.
|
||||
|
||||
2004-03-08 Marco Pesenti Gritti <marco@gnome.org>
|
||||
|
||||
* gtk/gtkentry.c: (gtk_entry_completion_key_press):
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-03-08 Morten Welinder <terra@gnome.org>
|
||||
|
||||
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder,
|
||||
get_icon_type, filename_get_info): Protect errno.
|
||||
|
||||
2004-03-08 Marco Pesenti Gritti <marco@gnome.org>
|
||||
|
||||
* gtk/gtkentry.c: (gtk_entry_completion_key_press):
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-03-08 Morten Welinder <terra@gnome.org>
|
||||
|
||||
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder,
|
||||
get_icon_type, filename_get_info): Protect errno.
|
||||
|
||||
2004-03-08 Marco Pesenti Gritti <marco@gnome.org>
|
||||
|
||||
* gtk/gtkentry.c: (gtk_entry_completion_key_press):
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user