diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-05 03:39:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-05 03:39:04 +0300 |
commit | b9277f939c2505fae2167f6caee4ff8a9e1d0685 (patch) | |
tree | dd6a44eedebf82f429de7cd621ca3334bf3ce843 /saedit/config.c | |
parent | 7e6fc28069280d94575f8cf03d38574bb86a12c2 (diff) | |
parent | 97911ac99f187a7c2c3eb4324b04cbb39b8e9bee (diff) | |
download | tools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.tar.gz tools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.tar.bz2 tools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.tar.xz tools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.zip |
Merge branch 'master' of ssh://gitent-scm.com/git/evol/privtools
Diffstat (limited to 'saedit/config.c')
-rw-r--r-- | saedit/config.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/saedit/config.c b/saedit/config.c index c514e26..f28ab54 100644 --- a/saedit/config.c +++ b/saedit/config.c @@ -9,10 +9,6 @@ | | \*=======================================*/ -#include <glib.h> -#include <ibusxml.h> -#include "common.h" -#include "xml.h" #include "config.h" Options *config_options_new() { @@ -60,10 +56,13 @@ void config_keys_save(Keys *keys) { POSTFIX_FOLDER, NULL)); g_key_file_set_boolean(key_file, "General", "ShowGrid", keys->show_grid); - g_file_set_contents(KEYS_CONFIG_FILE, - g_key_file_to_data(key_file, NULL, NULL), - -1, - NULL); + + mkdir(KEYS_CONFIG_DIR, S_IRWXU); + int fd = g_creat(KEYS_CONFIG_FILE, S_IREAD | S_IWRITE); + gchar *buf = g_key_file_to_data(key_file, NULL, NULL); + write(fd, buf, strlen(buf), NULL); + close(fd); + g_key_file_free(key_file); } |