From e7fb72a7320211fb7669194eacddce401348c692 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Jun 2003 09:42:22 +0000 Subject: Pass the error stream pointer to the URL globber, so that it can report errors correctly to the user, if need be. Also fixed so that a missing ] in the globbing process no longer leads to core dump. --- src/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 3a7139d81..3a52401e0 100644 --- a/src/main.c +++ b/src/main.c @@ -2592,7 +2592,9 @@ operate(struct Configurable *config, int argc, char *argv[]) if(!config->globoff) { /* Unless explicitly shut off, we expand '{...}' and '[...]' expressions and return total number of URLs in pattern set */ - res = glob_url(&urls, url, &urlnum); + res = glob_url(&urls, url, &urlnum, + config->showerror? + (config->errors?config->errors:stderr):NULL); if(res != CURLE_OK) return res; } @@ -2606,7 +2608,7 @@ operate(struct Configurable *config, int argc, char *argv[]) separator = 1; } for(i = 0; - (url = urls?next_url(urls):(i?NULL:strdup(url))); + (url = urls?glob_next_url(urls):(i?NULL:strdup(url))); i++) { char *outfile; outfile = outfiles?strdup(outfiles):NULL; @@ -2636,7 +2638,7 @@ operate(struct Configurable *config, int argc, char *argv[]) else if(urls) { /* fill '#1' ... '#9' terms from URL pattern */ char *storefile = outfile; - outfile = match_url(storefile, urls); + outfile = glob_match_url(storefile, urls); free(storefile); } -- cgit v1.2.3