From: hniksic Date: Tue, 12 Apr 2005 20:32:31 +0000 (-0700) Subject: [svn] Open the output file in binary mode. X-Git-Tag: v1.13~1204 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=4cf3365fcfb8a6d447ebe1083effb92643b880a3 [svn] Open the output file in binary mode. By Gisle Vanem. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2d6368e4..6214699e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-04-12 Gisle Vanem + + * ftp.c (getftp): Ditto. + + * http.c (gethttp): Open the output file in binary mode. + 2005-04-11 Hrvoje Niksic * hash.c: Conditionalize including config.h on HAVE_CONFIG_H diff --git a/src/ftp.c b/src/ftp.c index 2ced21b8..82bc84ae 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -982,7 +982,7 @@ Error in server response, closing control connection.\n")); fp = fopen (con->target, "wb"); else { - fp = fopen_excl (con->target, 0); + fp = fopen_excl (con->target, 1); if (!fp && errno == EEXIST) { /* We cannot just invent a new name and use it (which is diff --git a/src/http.c b/src/http.c index 5f221595..e3440d8a 100644 --- a/src/http.c +++ b/src/http.c @@ -1803,7 +1803,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) fp = fopen (*hs->local_file, "wb"); else { - fp = fopen_excl (*hs->local_file, 0); + fp = fopen_excl (*hs->local_file, 1); if (!fp && errno == EEXIST) { /* We cannot just invent a new name and use it (which is