From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10860 invoked from network); 20 Dec 2000 10:59:58 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 20 Dec 2000 10:59:58 -0000 Received: (qmail 8599 invoked by alias); 20 Dec 2000 10:59:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13302 Received: (qmail 8592 invoked from network); 20 Dec 2000 10:59:52 -0000 Message-ID: To: Hiroki Tamakoshi , zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: zftp bug report In-Reply-To: Your message of "20 Dec 2000 14:53:02 +0900." Date: Wed, 20 Dec 2000 10:59:20 +0000 From: Peter Stephenson > Transfering 0-size file cause an error, and subsequent transfers are > aborted. > > % zfget file > zftp_progress:33: division by zero This should fix that. It seemed to be having a strange knock-on effect on an ABOR command here. Index: Functions/Zftp/zftp_progress =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zftp_progress,v retrieving revision 1.1.1.4 diff -u -r1.1.1.4 zftp_progress --- Functions/Zftp/zftp_progress 1999/12/15 21:33:39 1.1.1.4 +++ Functions/Zftp/zftp_progress 2000/12/20 10:58:14 @@ -29,7 +29,7 @@ (( ${+zftpseconds} )) && (( SECONDS - zftpseconds < update )) && return # size is usually ZFTP_SIZE, but zftransfer may set ZFTP_TSIZE local size=${ZFTP_TSIZE:-$ZFTP_SIZE} - if [[ -n $size ]]; then + if [[ ${size:-0} -ne 0 ]]; then local frac="$(( ZFTP_COUNT * 100 / size ))%" if [[ $style = bar && ${+COLUMNS} = 1 && $COLUMNS -gt 0 ]]; then if (( ! ${+zftpseconds} )); then -- Peter Stephenson Software Engineer Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070