summaryrefslogtreecommitdiffstats
path: root/lib/libfetch
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libfetch')
-rw-r--r--lib/libfetch/ftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index cd8ff0d..6116593 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);
OpenPOWER on IntegriCloud