Skip to content

Commit

Permalink
Better fix for presets on Windows (#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
esimkowitz authored Nov 21, 2024
1 parent 697e828 commit 7054b17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/wconfig/settingsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7054b17

Please sign in to comment.