Skip to content

Commit 7054b17

Browse files
authored
Better fix for presets on Windows (#1336)
1 parent 697e828 commit 7054b17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/wconfig/settingsconfig.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ func readConfigHelper(fileName string, barr []byte, readErr error) (waveobj.Meta
189189

190190
func readConfigFileFS(fsys fs.FS, logPrefix string, fileName string) (waveobj.MetaMapType, []ConfigError) {
191191
barr, readErr := fs.ReadFile(fsys, fileName)
192-
if readErr != nil && strings.Contains(readErr.Error(), "invalid argument") {
193-
// If we get an `invalid argument` error, we may be using the wrong path separator for the given FS interface. Try switching the separator.
192+
if readErr != nil {
193+
// If we get an error, we may be using the wrong path separator for the given FS interface. Try switching the separator.
194194
barr, readErr = fs.ReadFile(fsys, filepath.ToSlash(fileName))
195195
}
196196
return readConfigHelper(logPrefix+fileName, barr, readErr)

0 commit comments

Comments
 (0)