GNOME Bugzilla – Bug 681942
Add more warnings and fix a file leak
Last modified: 2012-08-24 22:19:21 UTC
This adds more warnings and fixes a file leak
Created attachment 221306 [details] [review] Show an error when saving a thumbnail fails
Created attachment 221307 [details] [review] Remove the temporary file when saving a thumbnail fails
Review of attachment 221306 [details] [review]: ::: libgnome-desktop/gnome-bg.c @@ +2631,1 @@ Unintentional debugging leftover? ::: libgnome-desktop/gnome-desktop-thumbnail.c @@ +1341,3 @@ guint8 digest[16]; gsize digest_len = sizeof (digest); + GError *error; I prefer initializing at the same time as declaring, but up to you. @@ +1413,3 @@ else { + g_warning ("Failed to create thumbnail %s: %s", tmp_path, error->message); No objection to this since the function doesn't take a GError now, but were we to change this API, I think adding a GError and letting the caller handle it would make sense.
Review of attachment 221307 [details] [review]: Makes sense.
Created attachment 221329 [details] [review] Show an error when saving a thumbnail fails
Review of attachment 221329 [details] [review]: Looks fine.
Attachment 221307 [details] pushed as 715b3ae - Remove the temporary file when saving a thumbnail fails Attachment 221329 [details] pushed as 778b684 - Show an error when saving a thumbnail fails