diff options
author | murray <murray@FreeBSD.org> | 2001-03-14 10:05:48 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2001-03-14 10:05:48 +0000 |
commit | 05f7a141822d4330749370e608fff200f26f135b (patch) | |
tree | f1d32c6ac462e00cc87798a89d46302b125b4f5f | |
parent | 468e4ad11ece3e49984fea1b05b2c8495beabddb (diff) | |
download | FreeBSD-src-05f7a141822d4330749370e608fff200f26f135b.zip FreeBSD-src-05f7a141822d4330749370e608fff200f26f135b.tar.gz |
Avoid sending a pointless `CWD .' command which confuses some
non-standard ftp servers.
PR: 21856
-rw-r--r-- | usr.sbin/sysinstall/ftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c index 0adfcd2..2541230 100644 --- a/usr.sbin/sysinstall/ftp.c +++ b/usr.sbin/sysinstall/ftp.c @@ -163,7 +163,9 @@ try: * the base directory and try again. Lots of chdirs, but oh well. :) */ for (fdir = 0; ftp_dirs[fdir]; fdir++) { - if (ftpChdir(OpenConn, (char *)ftp_dirs[fdir]) != 0) + /* Avoid sending CWD . commands which confuse some ftp servers */ + if (strcmp(ftp_dirs[fdir], ".") && + (ftpChdir(OpenConn, (char *)ftp_dirs[fdir]) != 0)) continue; if (ftpChdir(OpenConn, rel) == 0) { ftpInitted = TRUE; |