mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:04:42 +00:00
chore: auto format code
This commit is contained in:
@@ -284,26 +284,26 @@ clean_orphaned_app_data() {
|
|||||||
if [[ ${#file_patterns[@]} -gt 0 ]]; then
|
if [[ ${#file_patterns[@]} -gt 0 ]]; then
|
||||||
for item_path in "${file_patterns[@]}"; do
|
for item_path in "${file_patterns[@]}"; do
|
||||||
local iteration_count=0
|
local iteration_count=0
|
||||||
for match in $item_path; do
|
for match in $item_path; do
|
||||||
[[ -e "$match" ]] || continue
|
[[ -e "$match" ]] || continue
|
||||||
((iteration_count++))
|
((iteration_count++))
|
||||||
if [[ $iteration_count -gt $MOLE_MAX_ORPHAN_ITERATIONS ]]; then
|
if [[ $iteration_count -gt $MOLE_MAX_ORPHAN_ITERATIONS ]]; then
|
||||||
break
|
break
|
||||||
fi
|
|
||||||
local bundle_id=$(basename "$match")
|
|
||||||
bundle_id="${bundle_id%.savedState}"
|
|
||||||
bundle_id="${bundle_id%.binarycookies}"
|
|
||||||
if is_bundle_orphaned "$bundle_id" "$match" "$installed_bundles"; then
|
|
||||||
local size_kb
|
|
||||||
size_kb=$(get_path_size_kb "$match")
|
|
||||||
if [[ -z "$size_kb" || "$size_kb" == "0" ]]; then
|
|
||||||
continue
|
|
||||||
fi
|
fi
|
||||||
safe_clean "$match" "Orphaned $label: $bundle_id"
|
local bundle_id=$(basename "$match")
|
||||||
((orphaned_count++))
|
bundle_id="${bundle_id%.savedState}"
|
||||||
((total_orphaned_kb += size_kb))
|
bundle_id="${bundle_id%.binarycookies}"
|
||||||
fi
|
if is_bundle_orphaned "$bundle_id" "$match" "$installed_bundles"; then
|
||||||
done
|
local size_kb
|
||||||
|
size_kb=$(get_path_size_kb "$match")
|
||||||
|
if [[ -z "$size_kb" || "$size_kb" == "0" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
safe_clean "$match" "Orphaned $label: $bundle_id"
|
||||||
|
((orphaned_count++))
|
||||||
|
((total_orphaned_kb += size_kb))
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user