summaryrefslogtreecommitdiff
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authorAdam David <adam@FreeBSD.org>1996-10-24 00:15:44 +0000
committerAdam David <adam@FreeBSD.org>1996-10-24 00:15:44 +0000
commitbf2226a7dbcf4afca34806560dc4274d1c959ddc (patch)
treef59a39857e61cff0ca67635b961f45dabd6834dd /usr.bin/fetch
parent88f04d6fce1e9119b6a073413851d74cd2998ef3 (diff)
Notes
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/fetch/main.c b/usr.bin/fetch/main.c
index 8f183248e6cc..62a84fe32e8b 100644
--- a/usr.bin/fetch/main.c
+++ b/usr.bin/fetch/main.c
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
-/* $Id: main.c,v 1.23 1996/09/19 18:07:20 peter Exp $ */
+/* $Id: main.c,v 1.24 1996/10/06 00:44:24 jmz Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
@@ -472,7 +472,6 @@ parse (char *s)
warnx("no filename??");
usage();
}
- ftp = 1;
}
else if (strncasecmp (s, "http://", 7) == 0) {
/* http://host.name/file/name */
@@ -495,13 +494,17 @@ parse (char *s)
return;
}
else {
- /* assume /host.name:/file/name */
+ /* assume host.name:/file/name */
p = strchr (s, ':');
if (!p) {
- warnx ("no filename??");
- usage ();
+ /* assume /file/name */
+ host = NULL;
+ ftp = http = 0;
+ file_to_get = s;
+ return;
}
}
+ ftp = 1;
*p++ = 0;
host = s;
s = strrchr (p, '/');