mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix #40426: Allow -r -O- only if FILE is regular
* main.c: added check of "-r -O FILE" option combination allow only if FILE is a regular file (bug #40426)
This commit is contained in:
parent
f71887bbe5
commit
12bae50b28
@ -1726,11 +1726,10 @@ for details.\n\n"));
|
||||
if (fstat (fileno (output_stream), &st) == 0 && S_ISREG (st.st_mode))
|
||||
output_stream_regular = true;
|
||||
}
|
||||
if (!output_stream_regular && opt.convert_links)
|
||||
if (!output_stream_regular && (opt.convert_links || opt.recursive))
|
||||
{
|
||||
fprintf (stderr, _("-k can be used together with -O only if \
|
||||
fprintf (stderr, _("-k or -r can be used together with -O only if \
|
||||
outputting to a regular file.\n"));
|
||||
print_usage (1);
|
||||
exit (WGET_EXIT_GENERIC_ERROR);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user