From a260febdf9a88b98088a64af2f0a3bee88ef86ce Mon Sep 17 00:00:00 2001 From: des Date: Thu, 20 Jul 2000 02:03:56 +0000 Subject: Fix the case where the file name is preceded by a lone slash. --- lib/libfetch/ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libfetch') diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 6fb16b2..05f429b 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -217,7 +217,7 @@ _ftp_cwd(int cd, char *file) char *s; int e; - if ((s = strrchr(file, '/')) == NULL) { + if ((s = strrchr(file, '/')) == NULL || s == file) { e = _ftp_cmd(cd, "CWD /"); } else { e = _ftp_cmd(cd, "CWD %.*s", s - file, file); -- cgit v1.1