aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/syncmanager.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2007-04-06 17:03:54 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2007-04-06 17:03:54 +0000
commit4b58fae540284062ef1dbd4afac5e6f4137aad00 (patch)
tree2f2166cd2c0ea74f7110429112fe7fcf745c0b33 /hardinfo2/syncmanager.c
parent69f6f439638c8751d0e72f20b0ea4c92e6319541 (diff)
Late-minute fixes
Diffstat (limited to 'hardinfo2/syncmanager.c')
-rw-r--r--hardinfo2/syncmanager.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hardinfo2/syncmanager.c b/hardinfo2/syncmanager.c
index d2714741..6602407a 100644
--- a/hardinfo2/syncmanager.c
+++ b/hardinfo2/syncmanager.c
@@ -26,6 +26,7 @@
#include <libsoup/soup-xmlrpc-response.h>
#include <stdarg.h>
+#include <string.h>
typedef struct _SyncDialog SyncDialog;
typedef struct _SyncNetArea SyncNetArea;
@@ -283,7 +284,19 @@ static void _action_call_function_got_response(SoupMessage *msg, gpointer user_d
DEBUG("saving to %s", filename);
+#ifdef g_file_set_contents
g_file_set_contents(filename, string, -1, NULL);
+#else
+ {
+ FILE *f;
+
+ f = fopen(filename, "w+");
+ if (f) {
+ fwrite(string, 1, strlen(string), f);
+ fclose(f);
+ }
+ }
+#endif
g_free(filename);
}