diff --git a/include/binaries b/include/binaries index f737bb86..cfa2f5fd 100644 --- a/include/binaries +++ b/include/binaries @@ -77,7 +77,8 @@ fi # Add a space to make sure we discover a related directory if it was already scanned - FIND=$(echo ${BINARY_PATHS_FOUND} | grep ", ${SCANDIR}") + # The grep -v is to prevent a match /usr/bin in something like /usr/bin/core_perl + FIND=$(echo ${BINARY_PATHS_FOUND} | grep ", ${SCANDIR}" | grep -v ", ${SCANDIR}/") if [ ! -z "${FIND}" ]; then SKIPDIR=1; LogText "Result: Skipping this directory as it was already scanned" fi