From bbe6b86c9ea6962c366fd7f1147353b7d120996a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 13 Sep 2011 10:11:46 +0200 Subject: [PATCH] Return a network failure when FTP downloads fail and --timestamping is used. --- NEWS | 6 +++++- src/ChangeLog | 5 +++++ src/ftp.c | 5 ++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 734e366b..163937e4 100644 --- a/NEWS +++ b/NEWS @@ -5,13 +5,17 @@ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, See the end for copying conditions. Please send GNU Wget bug reports to . + * Changes in Wget X.Y.Z ** Now --version and --help work again. ** Fix a build error on solaris 10 sparc. -** If --timestamping and --continue can be used at the same time. +** Now --timestamping and --continue work well together. + +** Return a network failure when FTP downloads fail and --timestamping + is specified. * Changes in Wget 1.13.3 diff --git a/src/ChangeLog b/src/ChangeLog index 4cb3267c..8eae78fc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-09-13 Giuseppe Scrivano + + * ftp.c (ftp_retrieve_glob): Propagate correctly the `res' error + code. + 2011-09-07 Giuseppe Scrivano * http.c (gethttp): Don't inhibit arest request if opt.timestamping is diff --git a/src/ftp.c b/src/ftp.c index 9e4f3d76..a586d849 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -2125,7 +2125,7 @@ ftp_retrieve_glob (struct url *u, ccon *con, int action) if (start) { /* Just get everything. */ - ftp_retrieve_list (u, start, con); + res = ftp_retrieve_list (u, start, con); } else { @@ -2154,8 +2154,7 @@ ftp_retrieve_glob (struct url *u, ccon *con, int action) if (opt.quota && total_downloaded_bytes > opt.quota) return QUOTEXC; else - /* #### Should we return `res' here? */ - return RETROK; + return res; } /* The wrapper that calls an appropriate routine according to contents -- 2.39.2