mirror of
https://github.com/tw93/Mole.git
synced 2026-02-07 02:25:40 +00:00
Improve performance and process handling
This commit is contained in:
@@ -78,8 +78,9 @@ scan_external_volumes() {
|
||||
start_section_spinner "Scanning $volume_count external volume(s)..."
|
||||
|
||||
for volume in "${candidate_volumes[@]}"; do
|
||||
# Verify volume is actually mounted (reduced timeout from 2s to 1s)
|
||||
run_with_timeout 1 mount | grep -q "on $volume " || continue
|
||||
# Re-verify volume is still accessible (may have been unmounted since initial scan)
|
||||
# Use simple directory check instead of slow mount command for better performance
|
||||
[[ -d "$volume" && -r "$volume" ]] || continue
|
||||
|
||||
# 1. Clean Trash on volume
|
||||
local volume_trash="$volume/.Trashes"
|
||||
|
||||
Reference in New Issue
Block a user