Treat an empty argument as an error, instead of fetching the

contents of the root directory.

MFC after:	1 week
This commit is contained in:
Ruslan Ermilov 2009-12-30 23:01:49 +00:00
parent a6c287f615
commit 8181961a73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201290

View File

@ -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;