diff --git a/ui/dr-ui/src/settings_store.rs b/ui/dr-ui/src/settings_store.rs index b2231c3..fe98eb3 100644 --- a/ui/dr-ui/src/settings_store.rs +++ b/ui/dr-ui/src/settings_store.rs @@ -25,12 +25,17 @@ pub struct SettingsStore { impl SettingsStore { /// Open the store at the platform config location. /// - /// `settings.json` in the platform's config directory — `dr_plat::dirs` - /// has the rule per platform — which is the same resolution `SessionStore` - /// makes, so the two files sit together and a user backing up one takes - /// both. + /// **The same resolution `SessionStore` makes**, by calling the same + /// function, so `settings.json` sits beside `sessions.json` on every + /// platform. That is `dr_plat::dirs`' config directory on a desktop and + /// the directory the entry point declared on Android — the second half + /// was the bug: this used to read `XDG_CONFIG_HOME` and `HOME` itself, + /// neither exists on Android, and the result was `.config/darkroom` + /// relative to a working directory of `/`. Every settings edit on a + /// tablet failed with "read-only file system", and the page said so + /// without saying why. pub fn open() -> Self { - Self::open_at(dr_plat::base_dir(dr_plat::Base::Config).join("settings.json")) + Self::open_at(dr_sync::account::config_dir().join("settings.json")) } /// Open at an explicit path — for tests, and for a non-default location.