summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>1998-05-09 08:56:07 +0000
committerdes <des@FreeBSD.org>1998-05-09 08:56:07 +0000
commite80744306c5b4e923e6e90c6464e1cd4987fdc92 (patch)
tree1bc12d1c24ef39dc554c8279817afd8c1c410c57 /usr.bin
parentf7925067dfdf7526924abb40d5d1ae00cebd968d (diff)
downloadFreeBSD-src-e80744306c5b4e923e6e90c6464e1cd4987fdc92.zip
FreeBSD-src-e80744306c5b4e923e6e90c6464e1cd4987fdc92.tar.gz
Arrggghhhh... forgot to strip the / after outputting %2f
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fetch/main.c9
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);
OpenPOWER on IntegriCloud