1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 21:00:13 +00:00

Code optimization as a whole

This commit is contained in:
Tw93
2025-12-01 16:27:32 +08:00
parent 8cb06c035f
commit 1578988ede
7 changed files with 273 additions and 102 deletions

View File

@@ -211,9 +211,9 @@ safe_find_delete() {
local type_filter="${4:-f}"
# Validate base directory exists and is not a symlink
# Silently skip if directory does not exist (e.g., old macOS paths)
if [[ ! -d "$base_dir" ]]; then
return 0
log_error "Directory does not exist: $base_dir"
return 1
fi
if [[ -L "$base_dir" ]]; then
@@ -247,9 +247,9 @@ safe_sudo_find_delete() {
local type_filter="${4:-f}"
# Validate base directory exists and is not a symlink
# Silently skip if directory does not exist (e.g., old macOS paths)
if [[ ! -d "$base_dir" ]]; then
return 0
log_error "Directory does not exist: $base_dir"
return 1
fi
if [[ -L "$base_dir" ]]; then