Skip to content

BUG: Account deletion leaves orphaned cache files #519

@andrinoff

Description

@andrinoff

Describe the bug

When an account is deleted via settings, config.RemoveAccount() only removes the account from the config array and deletes the password from the OS keyring. It does not clean up:

  • Cached emails in ~/.cache/matcha/folder_emails/
  • Cached email bodies in ~/.cache/matcha/email_bodies/
  • Contacts associated with that account
  • Any draft data for that account

Over time, this accumulates stale data on disk.

To reproduce

  1. Add an account and fetch emails
  2. Delete the account from settings
  3. Check ~/.cache/matcha/ — cached data for the deleted account remains

Expected behavior

Deleting an account should also clean up all associated cache files, or at minimum prompt the user to optionally delete cached data.

OS

All platforms

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions