From 87ca76f9cbdb928d6b31f233988cebc7df2b3349 Mon Sep 17 00:00:00 2001 From: Ryan Parrish Date: Wed, 20 Nov 2024 11:32:02 -0500 Subject: [PATCH] set maxdepth to prevent traversal into subdirectories --- Docker/liberate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/liberate.sh b/Docker/liberate.sh index 83caf88d..3f593464 100755 --- a/Docker/liberate.sh +++ b/Docker/liberate.sh @@ -80,7 +80,7 @@ setup_db() { # Figure out the right databse file if [[ -z "${LIBATION_DB_FILE}" ]]; then - dbCount=$(find "${DBPATH}" -type f -name "${dbpattern}" | wc -l) + dbCount=$(find "${DBPATH}" -maxdepth 1 -type f -name "${dbpattern}" | wc -l) if [ "${dbCount}" -gt 1 ]; then error "too many database files found, set LIBATION_DB_FILE to the filename you wish to use"