g_file_set_contents(): don't allocate display name
authorRyan Lortie <desrt@desrt.ca>
Mon, 3 Jun 2013 20:16:25 +0000 (16:16 -0400)
committerRyan Lortie <desrt@desrt.ca>
Mon, 3 Jun 2013 21:43:36 +0000 (17:43 -0400)
commitc152ceba090840be100ae6eeb90b639b85420ec7
treee5167edf10a3f45e5297fa48bfc9df78ad1458aa
parentd3be43fcc5165b7680c9073438ad60a3652c1703
g_file_set_contents(): don't allocate display name

g_file_set_contents() sets a GError in the event of various failures
that count occur.  It uses g_filename_display_name() in order to get the
filename to include in the messages.

Factor out the error handling to make it easier to allocate the display
name only when we need it (instead of allocating it every time).

https://bugzilla.gnome.org/show_bug.cgi?id=701560
glib/gfileutils.c