Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zftp bug report
- X-seq: zsh-workers 13302
- From: Peter Stephenson <pws@xxxxxxx>
- To: Hiroki Tamakoshi <hiroki-t@xxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: zftp bug report
- Date: Wed, 20 Dec 2000 10:59:20 +0000
- In-reply-to: Your message of "20 Dec 2000 14:53:02 +0900." <lzo3dfjej0h.fsf@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> 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 <pws@xxxxxxx> Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author