diff --git a/files/internals/functions b/files/internals/functions index 9b16c69..ccc3cd9 100644 --- a/files/internals/functions +++ b/files/internals/functions @@ -893,16 +893,20 @@ quar_hitlist() { } clamselector() { - scan_max_filesize=`cat $sig_md5_file | cut -d':' -f2 | sort -n | tail -n1` - if [ "$scan_max_filesize" -gt "1" 2> /dev/null ]; then - scan_max_filesize=$[scan_max_filesize+1] - clamscan_max_filesize="${scan_max_filesize}" - scan_max_filesize="${scan_max_filesize}c" + sig_max_filesize=`cat $sig_md5_file | cut -d':' -f2 | sort -n | tail -n1` + if [ "$sig_max_filesize" -gt "1" 2> /dev/null ]; then + if [ -z "$scan_max_filesize" ]; then + scan_max_filesize="${scan_max_filesize}c" + fi + clamscan_max_filesize=$[sig_max_filesize+1] else - scan_max_filesize="2048k" + if [ -z "$scan_max_filesize" ]; then + scan_max_filesize="2048k" + fi clamscan_max_filesize="2592000" fi + if [ "$scan_clamscan" == "1" ]; then trim_log $clamscan_log 10000 1 for dpath in $clamav_paths; do