mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 16:49:41 +00:00
Safety reinforcement
This commit is contained in:
@@ -100,7 +100,7 @@ safe_remove() {
|
||||
debug_log "Removing: $path"
|
||||
|
||||
# Perform the deletion
|
||||
if rm -rf "$path" 2> /dev/null; then
|
||||
if rm -rf "$path" 2> /dev/null; then # SAFE: safe_remove implementation
|
||||
return 0
|
||||
else
|
||||
[[ "$silent" != "true" ]] && log_error "Failed to remove: $path"
|
||||
@@ -135,7 +135,7 @@ safe_sudo_remove() {
|
||||
debug_log "Removing (sudo): $path"
|
||||
|
||||
# Perform the deletion
|
||||
if sudo rm -rf "$path" 2> /dev/null; then
|
||||
if sudo rm -rf "$path" 2> /dev/null; then # SAFE: safe_sudo_remove implementation
|
||||
return 0
|
||||
else
|
||||
log_error "Failed to remove (sudo): $path"
|
||||
|
||||
Reference in New Issue
Block a user