From c53072e31e8086d2fd432475eceb5f15923bd53d Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Tue, 6 Feb 2018 10:45:41 +0100 Subject: [PATCH] Ensure a parent directory with binaries is scanned - issue #517 on GitHub --- include/binaries | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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