From 7054b17eb3d16e561b2ece14120c9fa26021456a Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Thu, 21 Nov 2024 12:58:03 -0800 Subject: [PATCH] Better fix for presets on Windows (#1336) --- pkg/wconfig/settingsconfig.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/wconfig/settingsconfig.go b/pkg/wconfig/settingsconfig.go index 8c919d6ad..e139c2f2f 100644 --- a/pkg/wconfig/settingsconfig.go +++ b/pkg/wconfig/settingsconfig.go @@ -189,8 +189,8 @@ func readConfigHelper(fileName string, barr []byte, readErr error) (waveobj.Meta func readConfigFileFS(fsys fs.FS, logPrefix string, fileName string) (waveobj.MetaMapType, []ConfigError) { barr, readErr := fs.ReadFile(fsys, fileName) - if readErr != nil && strings.Contains(readErr.Error(), "invalid argument") { - // If we get an `invalid argument` error, we may be using the wrong path separator for the given FS interface. Try switching the separator. + if readErr != nil { + // If we get an error, we may be using the wrong path separator for the given FS interface. Try switching the separator. barr, readErr = fs.ReadFile(fsys, filepath.ToSlash(fileName)) } return readConfigHelper(logPrefix+fileName, barr, readErr)