From 5b178b62a1979d901c9edd7e02596d51c3214eed Mon Sep 17 00:00:00 2001 From: Tw93 Date: Fri, 5 Dec 2025 20:09:15 +0800 Subject: [PATCH] Enhanced protection --- lib/clean/apps.sh | 2 +- lib/clean/caches.sh | 2 +- lib/clean/user.sh | 2 +- mole | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/clean/apps.sh b/lib/clean/apps.sh index 2b7ba56..44cae5f 100644 --- a/lib/clean/apps.sh +++ b/lib/clean/apps.sh @@ -52,7 +52,7 @@ clean_ds_store_tree() { if [[ $file_count -ge 500 ]]; then break fi - done < <("${find_cmd[@]}" 2> /dev/null) + done < <("${find_cmd[@]}" 2> /dev/null || true) if [[ "$spinner_active" == "true" ]]; then stop_inline_spinner diff --git a/lib/clean/caches.sh b/lib/clean/caches.sh index a00e058..5e96079 100644 --- a/lib/clean/caches.sh +++ b/lib/clean/caches.sh @@ -94,7 +94,7 @@ clean_service_worker_cache() { fi cleaned_size=$((cleaned_size + size)) fi - done < <(command find "$cache_path" -type d -depth 2 2> /dev/null) + done < <(command find "$cache_path" -type d -depth 2 2> /dev/null || true) if [[ $cleaned_size -gt 0 ]]; then # Temporarily stop spinner for clean output diff --git a/lib/clean/user.sh b/lib/clean/user.sh index 1d5b781..9e8c297 100644 --- a/lib/clean/user.sh +++ b/lib/clean/user.sh @@ -28,7 +28,7 @@ clean_user_essentials() { # Safely iterate and remove each item while IFS= read -r -d '' item; do safe_remove "$item" true || true - done < <(command find "$volume/.Trashes" -mindepth 1 -maxdepth 1 -print0 2> /dev/null) + done < <(command find "$volume/.Trashes" -mindepth 1 -maxdepth 1 -print0 2> /dev/null || true) done fi diff --git a/mole b/mole index c0f20fc..1e79466 100755 --- a/mole +++ b/mole @@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$SCRIPT_DIR/lib/core/common.sh" # Version info -VERSION="1.11.26" +VERSION="1.11.27" MOLE_TAGLINE="can dig deep to clean your Mac." # Check if Touch ID is already configured