summaryrefslogtreecommitdiffstats
path: root/tools/ipodpatcher
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ipodpatcher')
-rw-r--r--tools/ipodpatcher/ipodpatcher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ipodpatcher/ipodpatcher.c b/tools/ipodpatcher/ipodpatcher.c
index 29a5939cea..28cac87c6c 100644
--- a/tools/ipodpatcher/ipodpatcher.c
+++ b/tools/ipodpatcher/ipodpatcher.c
@@ -1388,7 +1388,7 @@ int main(int argc, char* argv[])
fprintf(stderr,"[ERR] --read-firmware failed.\n");
}
} else if (action==READ_PARTITION) {
- outfile = open(filename,O_CREAT|O_WRONLY|O_BINARY,S_IREAD|S_IWRITE);
+ outfile = open(filename,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,S_IREAD|S_IWRITE);
if (outfile < 0) {
perror(filename);
return 4;