From bdd2ab77fbe31dc42a1af34c16027941180d8d2d Mon Sep 17 00:00:00 2001 From: Grigory Date: Thu, 4 Jan 2024 06:56:51 +0500 Subject: [PATCH] fix(cmd): check for spotify.exe existence instead of app folder (#2747) --- src/cmd/cmd.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cmd/cmd.go b/src/cmd/cmd.go index 4505e62365..e93a51ca9f 100644 --- a/src/cmd/cmd.go +++ b/src/cmd/cmd.go @@ -60,8 +60,13 @@ func InitPaths() { spotifyPath = utils.ReplaceEnvVarsInString(spotifyPath) prefsPath = utils.ReplaceEnvVarsInString(prefsPath) + testPath := spotifyPath - if _, err := os.Stat(spotifyPath); err != nil { + if runtime.GOOS == "windows" { + testPath = filepath.Join(spotifyPath, "Spotify.exe") + } + + if _, err := os.Stat(testPath); err != nil { actualSpotifyPath := utils.FindAppPath() if len(actualSpotifyPath) == 0 {