diff --git a/mirror-sync.sh b/mirror-sync.sh index c71f358..f1be810 100644 --- a/mirror-sync.sh +++ b/mirror-sync.sh @@ -293,7 +293,7 @@ rebuild_dusum_totals() { totalKBytes=0 for MODULE in ${MODULES:?}; do eval dusum="\${${MODULE}_dusum:-}" - if [[ -n $dusum ]]; then + if [[ -n $dusum ]] && [[ -f $dusum ]]; then while read -r size path; do if [[ -n $size ]]; then totalKBytes=$((totalKBytes+size)) @@ -313,7 +313,7 @@ rebuild_dusum_totals() { totalKBytes=0 for MODULE in ${MODULES:?}; do eval dusum="\${${MODULE}_dusum:-}" - if [[ -n $dusum ]]; then + if [[ -n $dusum ]] && [[ -f $dusum ]]; then while read -r size path; do if [[ -n $size ]]; then totalKBytes=$((totalKBytes+size))