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

Fix and optimize reading issues

This commit is contained in:
Tw93
2025-11-22 08:44:07 +08:00
parent 5c4671fe3f
commit bb6e6adb53

View File

@@ -283,7 +283,7 @@ execute_optimization() {
rm -f "$HOME/Library/Preferences/com.apple.recentitems.plist" 2> /dev/null || true
# Check if key exists before trying to delete
if defaults read NSGlobalDomain NSRecentDocumentsLimit &> /dev/null; then
if defaults read NSGlobalDomain NSRecentDocumentsLimit > /dev/null 2>&1; then
defaults delete NSGlobalDomain NSRecentDocumentsLimit 2> /dev/null || true
fi
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Finder/Apple menu recent items cleared"