summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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;
 }