Apparently the use of strerror was causing problems on certain
platforms. In this case, since the function being checked provides
a GError argument it makes sense to use that instead.
Closes bug #59034
gsize length = 0;
gchar *kf = g_key_file_to_data (conf->keyfile, &length, NULL);
+ GError *err = NULL;
- if (! g_file_set_contents (conf->filename, kf, length, NULL))
+ if (! g_file_set_contents (conf->filename, kf, length, &err))
{
- char *msg = strerror (errno);
- g_warning ("Cannot open %s for writing: %s", conf->filename, msg);
+ g_warning ("Cannot open %s for writing: %s", conf->filename, err->message);
+ g_error_free (err);
}
g_free (kf);