Avoid sending a pointless `CWD .' command which confuses some

non-standard ftp servers.

PR:		21856
This commit is contained in:
murray 2001-03-14 10:05:48 +00:00
parent 468e4ad11e
commit 05f7a14182

View File

@ -163,7 +163,9 @@ mediaInitFTP(Device *dev)
* 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;