From c23fb8a4d390a8e45a3bea702cc9b995be96c853 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Tue, 13 Jun 2006 10:19:59 +0000 Subject: Fix a bug introduced in rev 1.92, where, when changing from one directory to another, the first CWD after a string of CDUPs would incorrectly include a slash before the directory name. Reported by: obrien PR: bin/83278 --- lib/libfetch/ftp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libfetch') diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index cd8ff0d94b80..61165936264f 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -294,6 +294,8 @@ _ftp_cwd(conn_t *conn, const char *file) } } for (beg = file + i; beg < end; beg = file + i + 1) { + while (*beg == '/') + ++beg, ++i; for (++i; file + i < end && file[i] != '/'; ++i) /* nothing */ ; e = _ftp_cmd(conn, "CWD %.*s", file + i - beg, beg); -- cgit v1.3