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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user