Logs on fallback ui preferences

This commit is contained in:
riccardom
2026-07-29 14:33:24 +02:00
parent 451fa42fbd
commit a5e71db577

View File

@@ -246,6 +246,11 @@ func (s *Store) ExistedAtLoad() bool {
func (s *Store) load() error {
if _, err := os.Stat(s.path); err != nil {
if errors.Is(err, os.ErrNotExist) {
// Log the resolved path: a surprising directory here (e.g.
// /var/root/... when the GUI was launched with a stale HOME
// from a root installer) is the difference between a genuine
// first run and prefs silently read from the wrong place.
log.Infof("no ui preferences file at %s; using defaults", s.path)
return nil
}
return fmt.Errorf("stat preferences: %w", err)