1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-08 05:04:23 +00:00

Safer cleaning and enhancement capabilities

This commit is contained in:
Tw93
2025-11-29 22:43:57 +09:00
parent 1ded1c9a82
commit 75bd91840f
8 changed files with 242 additions and 100 deletions

View File

@@ -522,7 +522,7 @@ uninstall_applications() {
done
# Remove the application
if rm -rf "$app_path" 2> /dev/null; then
if safe_remove "$app_path" true; then
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Removed application"
else
echo -e " ${RED}${ICON_ERROR}${NC} Failed to remove $app_path"
@@ -538,7 +538,7 @@ uninstall_applications() {
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Removed $(echo "$file" | sed "s|$HOME|~|" | xargs basename)"
fi
else
if rm -rf "$file" 2> /dev/null; then
if safe_remove "$file" true; then
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Removed $(echo "$file" | sed "s|$HOME|~|" | xargs basename)"
fi
fi
@@ -558,7 +558,7 @@ uninstall_applications() {
echo -e " ${YELLOW}${ICON_ERROR}${NC} Failed to remove: $file"
fi
else
if sudo rm -rf "$file" 2> /dev/null; then
if safe_sudo_remove "$file"; then
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Removed $(basename "$file")"
else
echo -e " ${YELLOW}${ICON_ERROR}${NC} Failed to remove: $file"