mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
Fix an embarassing if-test-reversal bug that broke scheme guessing.
This commit is contained in:
parent
50bc553e3c
commit
74bd3d7698
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79422
@ -246,9 +246,9 @@ fetch(char *URL, char *path)
|
||||
if (!*url->scheme) {
|
||||
if (!*url->host)
|
||||
strcpy(url->scheme, SCHEME_FILE);
|
||||
else if (strncasecmp(url->host, "ftp.", 4))
|
||||
else if (strncasecmp(url->host, "ftp.", 4) == 0)
|
||||
strcpy(url->scheme, SCHEME_FTP);
|
||||
else if (strncasecmp(url->host, "www.", 4))
|
||||
else if (strncasecmp(url->host, "www.", 4) == 0)
|
||||
strcpy(url->scheme, SCHEME_HTTP);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user