mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 20:50:06 +00:00
refactor(clean): optimize Group Containers directory check
- Replace ls with find -maxdepth 1 to reduce IO and permission noise - Keep same behavior: silently skip if directory is empty or inaccessible Addresses: user.sh (line 484)
This commit is contained in:
@@ -481,7 +481,7 @@ process_container_cache() {
|
||||
clean_group_container_caches() {
|
||||
local group_containers_dir="$HOME/Library/Group Containers"
|
||||
[[ -d "$group_containers_dir" ]] || return 0
|
||||
if ! ls "$group_containers_dir" > /dev/null 2>&1; then
|
||||
if ! find "$group_containers_dir" -mindepth 1 -maxdepth 1 -print -quit 2> /dev/null | grep -q .; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user