MFC r201290: Treat an empty argument as an error, instead of

fetching the contents of the root directory.
This commit is contained in:
ru 2010-01-06 08:26:43 +00:00
parent 4e0b0a9186
commit 1e75263796

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;