Bug 660730: Use GStatBuf for portability
Thanks to Kean Johnston for pointing this out. There are a few places in GTK that use "struct stat", and then g_stat(), rather than using GStatBuf.This breaks things on Windows. Since the size of struct stat can vary depending on other flags specified, this has the potential to cause overwrites and is trivial to fix. Based on patch submitted by Kean Johnston
This commit is contained in:
@ -979,7 +979,7 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name)
|
||||
GKeyFile *theme_file;
|
||||
GError *error = NULL;
|
||||
IconThemeDirMtime *dir_mtime;
|
||||
struct stat stat_buf;
|
||||
GStatBuf stat_buf;
|
||||
|
||||
priv = icon_theme->priv;
|
||||
|
||||
@ -1123,7 +1123,7 @@ load_themes (GtkIconTheme *icon_theme)
|
||||
IconSuffix old_suffix, new_suffix;
|
||||
GTimeVal tv;
|
||||
IconThemeDirMtime *dir_mtime;
|
||||
struct stat stat_buf;
|
||||
GStatBuf stat_buf;
|
||||
|
||||
priv = icon_theme->priv;
|
||||
|
||||
@ -1948,7 +1948,7 @@ rescan_themes (GtkIconTheme *icon_theme)
|
||||
IconThemeDirMtime *dir_mtime;
|
||||
GList *d;
|
||||
int stat_res;
|
||||
struct stat stat_buf;
|
||||
GStatBuf stat_buf;
|
||||
GTimeVal tv;
|
||||
|
||||
priv = icon_theme->priv;
|
||||
|
||||
Reference in New Issue
Block a user