1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-08 22:34:22 +00:00

optimize code structure and reduce duplication

This commit is contained in:
Tw93
2025-12-02 15:24:19 +08:00
parent 2ad69b3845
commit bb50a345b6
21 changed files with 421 additions and 409 deletions

View File

@@ -232,7 +232,7 @@ clean_orphaned_app_data() {
if is_orphaned "$bundle_id" "$match"; then
# Use timeout to prevent du from hanging on large/problematic directories
local size_kb
size_kb=$(run_with_timeout 2 du -sk "$match" 2> /dev/null | awk '{print $1}' || echo "0")
size_kb=$(run_with_timeout 2 get_path_size_kb "$match")
if [[ -z "$size_kb" || "$size_kb" == "0" ]]; then
continue
fi