diff options
author | Nikias Bassen | 2011-10-05 22:22:14 +0200 |
---|---|---|
committer | Martin Szulecki | 2012-03-19 01:45:09 +0100 |
commit | 059de1b310095402597e51c5ac7078ed66ebfbd9 (patch) | |
tree | 8de9fd47f1028a66cf8d1a398ff10cb61d0d7d53 /src/userpref.c | |
parent | 10ad0c14e888291228c2f0c464e32e9c706c824e (diff) | |
download | libimobiledevice-059de1b310095402597e51c5ac7078ed66ebfbd9.tar.gz libimobiledevice-059de1b310095402597e51c5ac7078ed66ebfbd9.tar.bz2 |
Fixed userprefs read/write on win32
Diffstat (limited to 'src/userpref.c')
-rw-r--r-- | src/userpref.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/userpref.c b/src/userpref.c index 8d2ebf2..4c72981 100644 --- a/src/userpref.c +++ b/src/userpref.c @@ -188,7 +188,7 @@ static int config_write(const char *cfgfile, plist_t dict) char *hostidstr = NULL; plist_get_string_val(hostid, &hostidstr); if (hostidstr) { - FILE *fd = fopen(cfgfile, "w"); + FILE *fd = fopen(cfgfile, "wb"); if (fd) { fprintf(fd, "\n[Global]\nHostID=%s\n", hostidstr); fclose(fd); @@ -207,7 +207,7 @@ static int config_write(const char *cfgfile, plist_t dict) return res; } - FILE *fd = fopen(cfgfile, "w"); + FILE *fd = fopen(cfgfile, "wb"); if (!fd) { free(xml); return res; @@ -232,7 +232,7 @@ static int config_read(const char *cfgfile, plist_t *dict) } int res = -1; - FILE *fd = fopen(cfgfile, "r+"); + FILE *fd = fopen(cfgfile, "rb"); if (!fd) { return -1; } |