diff options
author | jkh <jkh@FreeBSD.org> | 1994-09-28 14:53:20 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1994-09-28 14:53:20 +0000 |
commit | ecee3a20ff01b3919059cc0362277de08546ef6f (patch) | |
tree | 9a9aa16f8a6915608786dee9d7fd63baee01ec4e /usr.bin/ncftp/open.c | |
parent | 0a36b6fcaa35545c0ca52c5a3c36e9880b82cdc2 (diff) | |
download | FreeBSD-src-ecee3a20ff01b3919059cc0362277de08546ef6f.zip FreeBSD-src-ecee3a20ff01b3919059cc0362277de08546ef6f.tar.gz |
Ye GODS! What I had to go through to make this thing exit with a non-zero
return status when a transfer failed! Hopefully, the next release will
do this more elegantly and make these changes short-lived.
Diffstat (limited to 'usr.bin/ncftp/open.c')
-rw-r--r-- | usr.bin/ncftp/open.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ncftp/open.c b/usr.bin/ncftp/open.c index 66733a8..fbbe794 100644 --- a/usr.bin/ncftp/open.c +++ b/usr.bin/ncftp/open.c @@ -399,6 +399,7 @@ void CheckRemoteSystemType(int force_binary) void ColonMode(OpenOptions *openopt) { int tmpverbose; + int cmdstatus; /* How do we tell if colonmodepath is a file or a directory? * We first try cd'ing to the path first. If we can, then it @@ -437,15 +438,15 @@ void ColonMode(OpenOptions *openopt) /* get() also handles 'more'. */ if (openopt->ftpcat) - (void) get(margc, margv); + cmdstatus = get(margc, margv); else - (void) mget(margc, margv); + cmdstatus = mget(margc, margv); /* If we were invoked from the command line, quit * after we got this file. */ if (eventnumber == 0L) { - (void) quit(0, NULL); + (void) quit(cmdstatus == CMDERR ? -1 : 0, NULL); } } verbose = tmpverbose; |