Skip to content

fix(linux): resolve snap config dir correctly for snap-installed apps - #396

Open
pandlab wants to merge 1 commit into
Browsers-software:mainfrom
pandlab:main
Open

pandlab wants to merge 1 commit into
Browsers-software:mainfrom
pandlab:main

Conversation

@pandlab

@pandlab pandlab commented Sep 18, 2026

Copy link
Copy Markdown

The application repository TOML uses the key snap_dir, but the AppConfig struct field is named snap_id and has no serde rename. Since the struct is #[serde(default)] and did not deny unknown fields, the key was silently dropped and snap_id was always None.

As a result the snap config dir resolved to
~/snap/common/.mozilla/firefox instead of
^^^
~/snap/firefox/common/.mozilla/firefox, so snap-installed browsers were skipped with "profiles.ini does not exist".
^^^^^^^^^^^

Add #[serde(rename = "snap_dir")], turn on deny_unknown_fields so a future typo fails loudly, and add a regression test.

Affects all 8 entries with snap_dir: Firefox x3, Chromium x3, Brave, Slack.

The application repository TOML uses the key `snap_dir`, but the
`AppConfig` struct field is named `snap_id` and has no serde rename.
Since the struct is `#[serde(default)]` and did not deny unknown
fields, the key was silently dropped and `snap_id` was always `None`.

As a result the snap config dir resolved to
`~/snap/common/.mozilla/firefox` instead of
`~/snap/firefox/common/.mozilla/firefox`, so snap-installed browsers
were skipped with "profiles.ini does not exist".

Add `#[serde(rename = "snap_dir")]`, turn on `deny_unknown_fields` so a
future typo fails loudly, and add a regression test.

Affects all 8 entries with `snap_dir`: Firefox x3, Chromium x3, Brave,
Slack.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant