diff options
Diffstat (limited to 'bin/ftpsync')
-rwxr-xr-x | bin/ftpsync | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ftpsync b/bin/ftpsync index ad53598..385aa92 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -211,8 +211,10 @@ tracefile() { done echo "Total bytes received in rsync: ${total}" echo "Total time spent in rsync: ${STATS_TOTAL_RSYNC_TIME}" - rate=$(( total / STATS_TOTAL_RSYNC_TIME )) - echo "Average rate: ${rate} B/s" + if [[ 0 != ${STATS_TOTAL_RSYNC_TIME} ]]; then + rate=$(( total / STATS_TOTAL_RSYNC_TIME )) + echo "Average rate: ${rate} B/s" + fi fi # full trace fi # other traces } > "${TRACEFILE}.new" |