svn commit: r201290 - head/usr.bin/fetch

Doug Barton dougb at FreeBSD.org
Thu Dec 31 00:01:50 UTC 2009


Ruslan Ermilov wrote:
> Author: ru
> Date: Wed Dec 30 23:01:49 2009
> New Revision: 201290
> URL: http://svn.freebsd.org/changeset/base/201290
> 
> Log:
>   Treat an empty argument as an error, instead of fetching the
>   contents of the root directory.

I'm pretty sure that you just broke portmaster's package functionality
with this change. I'm doing: fetch -q -o - ${sitepath} 2>/dev/null
to get the list of what is available on the package sites.

Is there a reason that you need to make this change?


Doug


> Modified:
>   head/usr.bin/fetch/fetch.c
> 
> Modified: head/usr.bin/fetch/fetch.c
> ==============================================================================
> --- head/usr.bin/fetch/fetch.c	Wed Dec 30 22:46:08 2009	(r201289)
> +++ head/usr.bin/fetch/fetch.c	Wed Dec 30 23:01:49 2009	(r201290)
> @@ -340,6 +340,11 @@ fetch(char *URL, const char *path)
>  		fetchDebug = 1;
>  
>  	/* parse URL */
> +	url = NULL;
> +	if (*URL == '\0') {
> +		warnx("empty URL");
> +		goto failure;
> +	}
>  	if ((url = fetchParseURL(URL)) == NULL) {
>  		warnx("%s: parse error", URL);
>  		goto failure;
> 


-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/



More information about the svn-src-head mailing list