* zftp bug report
@ 2000-12-20 5:53 Hiroki Tamakoshi
2000-12-20 10:59 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Hiroki Tamakoshi @ 2000-12-20 5:53 UTC (permalink / raw)
To: zsh-workers
Transfering 0-size file cause an error, and subsequent transfers are
aborted.
% zfget file
zftp_progress:33: division by zero
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: zftp bug report
2000-12-20 5:53 zftp bug report Hiroki Tamakoshi
@ 2000-12-20 10:59 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2000-12-20 10:59 UTC (permalink / raw)
To: Hiroki Tamakoshi, Zsh hackers list
> 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@csr.com> Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-20 10:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 5:53 zftp bug report Hiroki Tamakoshi
2000-12-20 10:59 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).