summaryrefslogtreecommitdiff
path: root/uclient-fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'uclient-fetch.c')
-rw-r--r--uclient-fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uclient-fetch.c b/uclient-fetch.c
index ebf49ae..851994f 100644
--- a/uclient-fetch.c
+++ b/uclient-fetch.c
@@ -103,7 +103,7 @@ static int open_output_file(const char *path, uint64_t resume_offset)
if (cur_resume)
flags = O_RDWR;
else
- flags = O_WRONLY;
+ flags = O_WRONLY | O_TRUNC;
if (!cur_resume && !output_file)
flags |= O_EXCL;