From 7fb0e5812f7ea3ee4ef6b490651df2584e9553df Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Tue, 13 Nov 2018 01:05:17 +0100 Subject: [PATCH] * src/ftp.c(ftp_retrieve_glob): Honor {accept,reject}-regex switches as well --- src/ftp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ftp.c b/src/ftp.c index 8af144ee..3f4ab53f 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -2626,6 +2626,12 @@ ftp_retrieve_glob (struct url *u, struct url *original_url, continue; } + if (!accept_url (f->name)) + { + logprintf (LOG_VERBOSE, _("%s is excluded/not-included through regex.\n"), f->name); + f = delelement (f, &start); + continue; + } /* Now weed out the files that do not match our globbing pattern. If we are dealing with a globbing pattern, that is. */ @@ -2657,8 +2663,6 @@ ftp_retrieve_glob (struct url *u, struct url *original_url, } } } - - f = f->next; } -- 2.19.1