28 lines
754 B
Diff
28 lines
754 B
Diff
|
diff -Nru wget-1.11.4.orig/src/log.c wget-1.11.4/src/log.c
|
||
|
--- wget-1.11.4.orig/src/log.c 2008-04-27 06:48:23.000000000 +0200
|
||
|
+++ wget-1.11.4/src/log.c 2008-09-08 02:44:19.000000000 +0200
|
||
|
@@ -516,12 +516,19 @@
|
||
|
{
|
||
|
if (file)
|
||
|
{
|
||
|
- logfp = fopen (file, appendp ? "a" : "w");
|
||
|
- if (!logfp)
|
||
|
+ if (strcmp(file, "-"))
|
||
|
{
|
||
|
- fprintf (stderr, "%s: %s: %s\n", exec_name, file, strerror (errno));
|
||
|
- exit (1);
|
||
|
+ logfp = fopen (file, appendp ? "a" : "w");
|
||
|
+ if (!logfp)
|
||
|
+ {
|
||
|
+ fprintf (stderr, "%s: %s: %s\n", exec_name, file, strerror (errno));
|
||
|
+ exit (1);
|
||
|
+ }
|
||
|
}
|
||
|
+ else
|
||
|
+ {
|
||
|
+ logfp = stdout;
|
||
|
+ }
|
||
|
}
|
||
|
else
|
||
|
{
|