GNOME Bugzilla – Bug 635307
iconcache: Ensure we don't lose data on power loss
Last modified: 2010-11-22 19:51:31 UTC
fsync() should ensure our data hits disk; since corrupt icon caches break all apps, we need to ensure it's valid.
Created attachment 174888 [details] [review] iconcache: Ensure we don't lose data on power loss
Review of attachment 174888 [details] [review]: Other than that, sounds ok. ::: gtk/updateiconcache.c @@ +1497,3 @@ + g_printerr (_("Failed to write cache file: %s\n"), g_strerror (errno)); + exit (1); + } If we want to be anal here, we probably don't want to ignore the return value of fclose either...
(In reply to comment #2) > Review of attachment 174888 [details] [review]: > > Other than that, sounds ok. > > ::: gtk/updateiconcache.c > @@ +1497,3 @@ > + g_printerr (_("Failed to write cache file: %s\n"), g_strerror (errno)); > + exit (1); > + } > > If we want to be anal here, we probably don't want to ignore the return value > of fclose either... You're absolutely right, new patch incoming.
Created attachment 174891 [details] [review] iconcache: Ensure we don't lose data on power loss fsync() should ensure our data hits disk; since corrupt icon caches break all apps, we need to ensure it's valid.
Review of attachment 174891 [details] [review]: Looks good now.
Committed to gtk-2-24. Note this patch could go into gtk3, but better to remove gtk-update-icon-cache-3.0 entirely.
Committed to master as commit 6c6b49392629a8ee2facafb66c8867a49a3e9036 (In reply to comment #6) > Committed to gtk-2-24. Note this patch could go into gtk3, but better to > remove gtk-update-icon-cache-3.0 entirely. Why?