summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-09-19 05:22:48 +0200
committerGravatar Nikias Bassen2013-09-19 05:22:48 +0200
commite53fcd1dd30f7dcd3c496ef25c3dea197e928ce7 (patch)
tree28f05a63a086f1e6acfbc2ec20d1ec4c79624f47 /common
parent52b32cdd8c58b42379b367fe5e4f01db730acf3b (diff)
downloadlibimobiledevice-e53fcd1dd30f7dcd3c496ef25c3dea197e928ce7.tar.gz
libimobiledevice-e53fcd1dd30f7dcd3c496ef25c3dea197e928ce7.tar.bz2
utils: make buffer_write_to_filename overwrite instead of append to existing files
Diffstat (limited to 'common')
-rw-r--r--common/utils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/utils.c b/common/utils.c
index 5248c2c..1b207ea 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -139,9 +139,7 @@ void buffer_write_to_filename(const char *filename, const char *buffer, uint64_t
{
FILE *f;
- f = fopen(filename, "ab");
- if (!f)
- f = fopen(filename, "wb");
+ f = fopen(filename, "wb");
if (f) {
fwrite(buffer, sizeof(char), length, f);
fclose(f);