From 7b85d07800030beecf2e2386c3c7539d3ad0629c Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 27 Nov 2012 09:28:30 +0100 Subject: Use binary flag for fopen() to fix file operations for win32 --- src/ideviceinstaller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index dfd88b7..12577f7 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c @@ -726,7 +726,7 @@ run_again: } /* copy archive to device */ - f = fopen(appid, "r"); + f = fopen(appid, "rb"); if (!f) { fprintf(stderr, "fopen: %s: %s\n", appid, strerror(errno)); goto leave_cleanup; @@ -1026,7 +1026,7 @@ run_again: } free(copy_path); - f = fopen(localfile, "w"); + f = fopen(localfile, "wb"); if (!f) { fprintf(stderr, "ERROR: fopen: %s: %s\n", localfile, strerror(errno)); free(localfile); -- cgit v1.1-32-gdbae