diff options
Diffstat (limited to 'Functions/Zftp/zftransfer')
-rw-r--r-- | Functions/Zftp/zftransfer | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Functions/Zftp/zftransfer b/Functions/Zftp/zftransfer index c70bf7248..432e2f584 100644 --- a/Functions/Zftp/zftransfer +++ b/Functions/Zftp/zftransfer @@ -43,10 +43,11 @@ zfautocheck || return 1 local style zstyle -s ':zftp:zftransfer' progress style if [[ -n $style && $style != none ]]; then - local ZFTP_TSIZE array tmpfile=${TMPPREFIX}zft$$ - zftp remote $file1 >$tmpfile 2>/dev/null - array=($(<$tmpfile)) - rm -f $tmpfile + local ZFTP_TSIZE array + () { + zftp remote $file1 >|$1 2>/dev/null + array=($(<$1)) + } =(: temporary file) [[ $#array -eq 2 ]] && ZFTP_TSIZE=$array[1] fi |