From: Felix Fietkau Date: Sat, 23 Jan 2016 19:59:45 +0000 (+0100) Subject: uclient-fetch: truncate output files (unless resuming) X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuclient.git;a=commitdiff_plain;h=caa8052ac55218a687593f3dcf30229016e48b0d;ds=inline uclient-fetch: truncate output files (unless resuming) Signed-off-by: Felix Fietkau --- 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;