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
This commit is contained in:
des 2006-06-13 10:19:59 +00:00
parent 9e9a1ba513
commit a5357a7c3f

View File

@ -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);