From 4cf3365fcfb8a6d447ebe1083effb92643b880a3 Mon Sep 17 00:00:00 2001 From: hniksic Date: Tue, 12 Apr 2005 13:32:31 -0700 Subject: [PATCH] [svn] Open the output file in binary mode. By Gisle Vanem. --- src/ChangeLog | 6 ++++++ src/ftp.c | 2 +- src/http.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.2