mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Remove output document in case of download problems when -O and --quiet are given.
This commit is contained in:
parent
4ad743db98
commit
f1b726490e
@ -1427,7 +1427,15 @@ cleanup (void)
|
||||
/* Free external resources, close files, etc. */
|
||||
|
||||
if (output_stream)
|
||||
{
|
||||
fclose (output_stream);
|
||||
if (opt.output_document
|
||||
&& !(total_downloaded_bytes > 0))
|
||||
{
|
||||
unlink (opt.output_document);
|
||||
}
|
||||
}
|
||||
|
||||
/* No need to check for error because Wget flushes its output (and
|
||||
checks for errors) after any data arrives. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user