mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 00:51:28 +02:00
Logs on fallback ui preferences
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user