Skip to content

fix: silence EPERM errors when removing temp files#63

Merged
guhcostan merged 1 commit into
mainfrom
fix/eperm-silent
Jun 9, 2026
Merged

fix: silence EPERM errors when removing temp files#63
guhcostan merged 1 commit into
mainfrom
fix/eperm-silent

Conversation

@guhcostan

Copy link
Copy Markdown
Owner

Summary

  • Adds EPERM to the list of silenced error codes in removeItem alongside EACCES and ENOENT

Context

Closes #61. macOS SIP/TCC returns EPERM (not EACCES) for system-owned temp directories like /var/folders/.../T/com.apple.*. Users were seeing dozens of Failed to remove ... EPERM lines that are expected and not actionable.

Test plan

  • Run mac-cleaner-cli → select "Temporary Files" → confirm no EPERM spam in output

EPERM is returned by macOS SIP/TCC for system-owned temp directories
(e.g. /var/folders/.../T/com.apple.*). These are expected and not
actionable by the user, so treat them like EACCES and skip logging.

Fixes #61
@guhcostan guhcostan merged commit 48a414b into main Jun 9, 2026
6 checks passed
@guhcostan guhcostan deleted the fix/eperm-silent branch June 9, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug? Failed to remove items

1 participant