Honor FTP_PASSIVE_MODE so caller doesn't need to.

This commit is contained in:
Dag-Erling Smørgrav 2000-05-26 12:56:53 +00:00
parent c4de295680
commit d02e84a626
1 changed files with 4 additions and 0 deletions

View File

@ -218,6 +218,10 @@ _ftp_transfer(int cd, char *oper, char *file,
high = (flags && strchr(flags, 'h'));
verbose = (flags && strchr(flags, 'v'));
/* passive mode */
if (!pasv && (s = getenv("FTP_PASSIVE_MODE")) != NULL)
pasv = (strncasecmp(s, "no", 2) != 0);
/* change directory */
if (((s = strrchr(file, '/')) != NULL) && (s != file)) {
*s = 0;