summary refs log tree commit diff stats
path: root/plugins/fishlim
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-12-12 05:26:22 -0500
committerTingPing <tingping@tingping.se>2014-12-15 15:08:00 -0500
commitce396b3ddbd18fb64aa96a07c07679df14efec66 (patch)
treea487bf0dffddd50ad3d2a5c9452bf36bed07f7fb /plugins/fishlim
parentebe0ad4cd5d685a8d2dca667b18ccbd876a2ebf9 (diff)
fishlim: Use standard keyfile save function
Diffstat (limited to 'plugins/fishlim')
-rw-r--r--plugins/fishlim/keystore.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/fishlim/keystore.c b/plugins/fishlim/keystore.c
index 9f1c446e..45cca668 100644
--- a/plugins/fishlim/keystore.c
+++ b/plugins/fishlim/keystore.c
@@ -131,16 +131,11 @@ static bool delete_nick(GKeyFile *keyfile, const char *nick) {
 static bool save_keystore(GKeyFile *keyfile) {
     char *filename;
     bool ok;
-    // Serialize
-    gsize file_length;
-    gchar *file_data = g_key_file_to_data(keyfile, &file_length, NULL);
-    if (!file_data) return false;
-    
-    // Write to file
+
     filename = get_config_filename();
-    ok = g_file_set_contents(filename, file_data, file_length, NULL);
-    g_free(filename);
-    g_free(file_data);
+    ok = g_key_file_save_to_file (keyfile, filename, NULL);
+    g_free (filename);
+
     return ok;
 }