From c35d2abd99a193ef49e21e02591cb6572269291f Mon Sep 17 00:00:00 2001 From: Yad Smood Date: Tue, 27 Feb 2024 11:51:34 +0800 Subject: [PATCH] fix: unexpected preference override. Resolves #1011 --- lib/launcher/launcher.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/launcher/launcher.go b/lib/launcher/launcher.go index b547f2af..11df4518 100644 --- a/lib/launcher/launcher.go +++ b/lib/launcher/launcher.go @@ -462,7 +462,9 @@ func (l *Launcher) hasLaunched() bool { func (l *Launcher) setupUserPreferences() { userDir := l.Get(flags.UserDataDir) - if userDir == "" { + pref := l.Get(flags.Preferences) + + if userDir == "" || pref == "" { return } @@ -476,12 +478,6 @@ func (l *Launcher) setupUserPreferences() { path := filepath.Join(userDir, profile, "Preferences") - pref := l.Get(flags.Preferences) - - if pref == "" { - pref = "{}" - } - utils.E(utils.OutputFile(path, pref)) }