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:
parent
1126c5fc83
commit
c056a4415d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user