Skip to content

Mac App should respect CLI whitelist for .DS_Store prevention optimization #894

Description

@TimmySheep

Hi, thanks for building Mole.

I noticed that the CLI version provides an optimize whitelist via:

mo optimize --whitelist

I added the .DS_Store prevention optimization to the whitelist because I want Finder to keep writing .DS_Store files on external drives and network volumes.

However, when I run Optimize from the Mole Mac App GUI, it still appears to apply this optimization again.

After running GUI Optimize, the following macOS defaults are written back:
com.apple.desktopservices DSDontWriteNetworkStores = 1
com.apple.desktopservices DSDontWriteUSBStores = 1
This means the GUI Optimize feature does not seem to respect the CLI optimize whitelist.

Expected behavior

The Mole Mac App should either:

  1. Respect the CLI optimize whitelist, for example ~/.config/mole/whitelist_optimize; or
  2. Provide a whitelist / exclude option in the GUI Optimize page.

Actual behavior

The CLI whitelist works in the command line version, but the Mac App GUI still applies the .DS_Store prevention optimization.

Steps to reproduce

  1. Run:
    mo optimize --whitelist
  2. Add the .DS_Store prevention task to the whitelist.
  3. Restore the macOS defaults:
    defaults delete com.apple.desktopservices DSDontWriteNetworkStores 2>/dev/null
    defaults delete com.apple.desktopservices DSDontWriteUSBStores 2>/dev/null
    killall Finder
  4. Run Optimize from the Mole Mac App GUI.
  5. Check the defaults again:
    defaults read com.apple.desktopservices DSDontWriteNetworkStores
    defaults read com.apple.desktopservices DSDontWriteUSBStores
    Result

The values are written back as 1, which means the GUI Optimize feature still applies this optimization.

Why this matters

Some users may intentionally want Finder to keep writing .DS_Store files on external drives or network volumes, for example to preserve Finder folder view settings.

Since the CLI already supports an optimize whitelist, it would be helpful if the Mac App GUI respected the same whitelist or exposed a similar option in the GUI.
Environment

  • Mole version 1.38.1
    macOS: 15.7.5
    Architecture: arm64
    Kernel: 24.6.0
    SIP: Enabled
  • macOS version: V1.3.0
  • Mac model: MacBook Pro M2pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions