From 28556b95febc77ebdd2d2f2e0be4a0157dcaf735 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 15 Feb 2011 11:03:53 +0100 Subject: wget: check for final write errors for -O FILE too Signed-off-by: Denys Vlasenko --- networking/wget.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'networking/wget.c') diff --git a/networking/wget.c b/networking/wget.c index 6c9a51211..ad2bfa4b5 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -941,5 +941,8 @@ int wget_main(int argc UNUSED_PARAM, char **argv) while (*argv) exitcode |= download_one_url(*argv++); + if (G.output_fd >= 0) + xclose(G.output_fd); + return exitcode; } -- cgit v1.2.3