This commit is contained in:
2025-06-28 23:26:40 -07:00
parent 779af87acf
commit 847fd60ff3
3 changed files with 22 additions and 5 deletions

View File

@@ -18,11 +18,6 @@ fi
# Build the find command - start with basic find and path
FIND_CMD="find \"$SEARCH_PATH\""
if [[ -n "$FILE_TYPE" ]]; then
# Add type filter first
FIND_CMD="$FIND_CMD -type $FILE_TYPE"
fi
# Add depth constraints before name pattern
if [[ -n "$MAX_DEPTH" ]]; then
FIND_CMD="$FIND_CMD -maxdepth $MAX_DEPTH"
@@ -32,6 +27,11 @@ if [[ -n "$MIN_DEPTH" ]]; then
FIND_CMD="$FIND_CMD -mindepth $MIN_DEPTH"
fi
if [[ -n "$FILE_TYPE" ]]; then
# Add type filter first
FIND_CMD="$FIND_CMD -type $FILE_TYPE"
fi
# Add name pattern
FIND_CMD="$FIND_CMD -name \"$PATTERN\""