mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fixed #44516 -o- not logging to stdout
src/log.c (log_init): check for hypen on filename, set stdout
This commit is contained in:
parent
12bae50b28
commit
e04c5989ff
@ -597,6 +597,12 @@ void
|
||||
log_init (const char *file, bool appendp)
|
||||
{
|
||||
if (file)
|
||||
{
|
||||
if (HYPHENP (file))
|
||||
{
|
||||
logfp = stdout;
|
||||
}
|
||||
else
|
||||
{
|
||||
logfp = fopen (file, appendp ? "a" : "w");
|
||||
if (!logfp)
|
||||
@ -605,6 +611,7 @@ log_init (const char *file, bool appendp)
|
||||
exit (WGET_EXIT_GENERIC_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The log goes to stderr to avoid collisions with the output if
|
||||
|
Loading…
Reference in New Issue
Block a user