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:
ru 2009-12-30 23:01:49 +00:00
parent 1126c5fc83
commit c056a4415d

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;