From 49cbf3c47aca0bfecce583c08f7057b00794244d Mon Sep 17 00:00:00 2001 From: zsien Date: Thu, 28 Nov 2024 15:45:05 +0800 Subject: [PATCH] chore: ignore the error of getLastUser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免首次开机时报错 Bug: https://pms.uniontech.com/bug-view-282785.html --- sound-theme-player/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound-theme-player/main.go b/sound-theme-player/main.go index 73fc6fe..6617a71 100644 --- a/sound-theme-player/main.go +++ b/sound-theme-player/main.go @@ -114,7 +114,8 @@ func (m *Manager) Play(theme, event, device string) *dbus.Error { } uid, err := getLastUser() if err != nil { - return dbusutil.ToError(err) + logger.Warning(err) + return nil } var cfg config err = loadUserConfig(int(uid), &cfg)