diff options
author | des <des@FreeBSD.org> | 1998-05-09 08:56:07 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 1998-05-09 08:56:07 +0000 |
commit | e80744306c5b4e923e6e90c6464e1cd4987fdc92 (patch) | |
tree | 1bc12d1c24ef39dc554c8279817afd8c1c410c57 /usr.bin/fetch | |
parent | f7925067dfdf7526924abb40d5d1ae00cebd968d (diff) | |
download | FreeBSD-src-e80744306c5b4e923e6e90c6464e1cd4987fdc92.zip FreeBSD-src-e80744306c5b4e923e6e90c6464e1cd4987fdc92.tar.gz |
Arrggghhhh... forgot to strip the / after outputting %2f
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r-- | usr.bin/fetch/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/fetch/main.c b/usr.bin/fetch/main.c index 571bd1e..2fe30ae 100644 --- a/usr.bin/fetch/main.c +++ b/usr.bin/fetch/main.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -/* $Id: main.c,v 1.44 1998/02/20 05:11:42 jb Exp $ */ +/* $Id: main.c,v 1.45 1998/05/09 08:41:23 des Exp $ */ #include <sys/types.h> @@ -181,8 +181,11 @@ main(int argc, char *const *argv) strcpy(uri, "ftp://"); strcat(uri, hostname); strcat(uri, "/"); - if (change_to_dir[0] == '/') strcat(uri, "%2f"); - strcat(uri, change_to_dir); + if (change_to_dir[0] == '/') { + strcat(uri, "%2f"); + strcat(uri, change_to_dir+1); + } + else strcat(uri, change_to_dir); if (file_to_get[0] != '/' && uri[strlen(uri) - 1] != '/') strcat(uri, "/"); strcat(uri, file_to_get); |