summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-04-07 18:45:09 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-04-07 18:45:09 +0000
commit116699db55db42f20f8805016f6877b652a9e34f (patch)
tree20f57a5ae4163324bbeaabdacf1d7bb40b8f6ba0
parentaee316885cde4d2a9d75a029b3bcf0b7c6b3debb (diff)
downloadgtk+-116699db55db42f20f8805016f6877b652a9e34f.tar.gz
Some fixes from Morten Welinder (#172947):
2005-04-07 Matthias Clasen <mclasen@redhat.com> Some fixes from Morten Welinder (#172947): * gtk/updateiconcache.c (icon_name_hash): Make this compiler- and platform-independent. (is_cache_up_to_date): Don't compare mtimes is a stat call failed. (build_cache): Error out if a stat fails.
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLog.pre-2-109
-rw-r--r--ChangeLog.pre-2-89
-rw-r--r--gtk/updateiconcache.c11
4 files changed, 33 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a9400e63c..e3040094b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2005-04-07 Matthias Clasen <mclasen@redhat.com>
+ Some fixes from Morten Welinder (#172947):
+
+ * gtk/updateiconcache.c (icon_name_hash): Make this compiler-
+ and platform-independent.
+ (is_cache_up_to_date): Don't compare mtimes is a stat call failed.
+ (build_cache): Error out if a stat fails.
+
+2005-04-07 Matthias Clasen <mclasen@redhat.com>
+
* gtk/updateiconcache.c (is_cache_up_to_date): Return
TRUE if the cache is newer than the directory. (#172852,
Jacob Kroon)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 7a9400e63c..e3040094b9 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,14 @@
2005-04-07 Matthias Clasen <mclasen@redhat.com>
+ Some fixes from Morten Welinder (#172947):
+
+ * gtk/updateiconcache.c (icon_name_hash): Make this compiler-
+ and platform-independent.
+ (is_cache_up_to_date): Don't compare mtimes is a stat call failed.
+ (build_cache): Error out if a stat fails.
+
+2005-04-07 Matthias Clasen <mclasen@redhat.com>
+
* gtk/updateiconcache.c (is_cache_up_to_date): Return
TRUE if the cache is newer than the directory. (#172852,
Jacob Kroon)
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 7a9400e63c..e3040094b9 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,5 +1,14 @@
2005-04-07 Matthias Clasen <mclasen@redhat.com>
+ Some fixes from Morten Welinder (#172947):
+
+ * gtk/updateiconcache.c (icon_name_hash): Make this compiler-
+ and platform-independent.
+ (is_cache_up_to_date): Don't compare mtimes is a stat call failed.
+ (build_cache): Error out if a stat fails.
+
+2005-04-07 Matthias Clasen <mclasen@redhat.com>
+
* gtk/updateiconcache.c (is_cache_up_to_date): Return
TRUE if the cache is newer than the directory. (#172852,
Jacob Kroon)
diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c
index ea76a903b0..f9c2fbec3d 100644
--- a/gtk/updateiconcache.c
+++ b/gtk/updateiconcache.c
@@ -68,7 +68,7 @@ is_cache_up_to_date (const gchar *path)
retval = g_stat (cache_path, &cache_stat);
g_free (cache_path);
- if (retval < 0 && errno == ENOENT)
+ if (retval < 0)
{
/* Cache file not found */
return FALSE;
@@ -233,8 +233,8 @@ struct _HashNode
static guint
icon_name_hash (gconstpointer key)
{
- const char *p = key;
- guint h = *p;
+ const signed char *p = key;
+ guint32 h = *p;
if (h)
for (p += 1; *p != '\0'; p++)
@@ -604,8 +604,9 @@ build_cache (const gchar *path)
/* Update time */
/* FIXME: What do do if an error occurs here? */
- g_stat (path, &path_stat);
- g_stat (cache_path, &cache_stat);
+ if (g_stat (path, &path_stat) < 0 ||
+ g_stat (cache_path, &cache_stat))
+ exit (1);
utime_buf.actime = path_stat.st_atime;
utime_buf.modtime = cache_stat.st_mtime;