From 74bd3d76980d1ed30eba1b6131633278d58b840e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sun, 8 Jul 2001 15:17:26 +0000 Subject: [PATCH] Fix an embarassing if-test-reversal bug that broke scheme guessing. --- usr.bin/fetch/fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index d05b483b26e5..a63f04ea68c2 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -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); }