mirror of
https://github.com/tw93/Mole.git
synced 2026-03-24 15:45:07 +00:00
fix(purge): avoid command find in fallback scan (#478)
This commit is contained in:
@@ -504,7 +504,9 @@ scan_purge_targets() {
|
|||||||
[[ $i -lt $((${#purge_targets[@]} - 1)) ]] && target_expr+=(-o)
|
[[ $i -lt $((${#purge_targets[@]} - 1)) ]] && target_expr+=(-o)
|
||||||
done
|
done
|
||||||
|
|
||||||
command find "$search_path" -mindepth "$min_depth" -maxdepth "$max_depth" -type d \
|
# Use plain `find` here for compatibility with environments where
|
||||||
|
# `command find` behaves inconsistently in this complex expression.
|
||||||
|
find "$search_path" -mindepth "$min_depth" -maxdepth "$max_depth" -type d \
|
||||||
\( "${prune_expr[@]}" \) -prune -o \
|
\( "${prune_expr[@]}" \) -prune -o \
|
||||||
\( "${target_expr[@]}" \) -print -prune \
|
\( "${target_expr[@]}" \) -print -prune \
|
||||||
2> /dev/null > "$output_file.raw" || true
|
2> /dev/null > "$output_file.raw" || true
|
||||||
|
|||||||
Reference in New Issue
Block a user