Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Fri, 08 Jun 2012 16:37:19 Commit: 17d497b5e2932b278004446558250ff239c548a9 https://github.com/geany/geany-plugins/commit/17d497b5e2932b278004446558250f...
Log Message: ----------- debugger: Re-implement create_copy_keyfile() without a temp file
Modified Paths: -------------- debugger/src/dconfig.c
Modified: debugger/src/dconfig.c 16 files changed, 5 insertions(+), 11 deletions(-) =================================================================== @@ -81,20 +81,14 @@ */ static GKeyFile *create_copy_keyfile(GKeyFile *keyfile) { - gchar *path, *config_data; GKeyFile *copy; + gchar *data; + gsize length;
- close(g_file_open_tmp(NULL, &path, NULL)); - - config_data = g_key_file_to_data(keyfile, NULL, NULL); - g_file_set_contents(path, config_data, -1, NULL); - g_free(config_data); - + data = g_key_file_to_data(keyfile, &length, NULL); copy = g_key_file_new(); - g_key_file_load_from_file(copy, path, G_KEY_FILE_NONE, NULL); - - g_remove(path); - g_free(path); + g_key_file_load_from_data(copy, data, length, G_KEY_FILE_NONE, NULL); + g_free(data);
return copy; }
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org