No forward slashes in filepath.Join to satisfy golangci-lint

This commit is contained in:
Will Roberts 2021-03-23 23:30:00 -04:00
parent b18a70cef9
commit d1c1e8bd26
3 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ func DefaultConfig() *Configuration {
}
case "linux":
if usr, err := user.Current(); err == nil {
config.MpqPath = filepath.Join(usr.HomeDir, ".wine/drive_c/Program Files (x86)/Diablo II")
config.MpqPath = filepath.Join(usr.HomeDir, ".wine", "drive_c", "Program Files (x86)", "Diablo II")
}
}

View File

@ -223,7 +223,7 @@ func (f *HeroStateFactory) getGameBaseSavePath() (string, error) {
return "", err
}
return filepath.Join(configDir, "OpenDiablo2/Saves"), nil
return filepath.Join(configDir, "OpenDiablo2", "Saves"), nil
}
func (f *HeroStateFactory) getFirstFreeFileName() string {

View File

@ -72,7 +72,7 @@ type Credits struct {
// LoadContributors loads the contributors data from file
func (v *Credits) LoadContributors() []string {
file, err := os.Open(filepath.Join("./", "CONTRIBUTORS"))
file, err := os.Open(filepath.Join(".", "CONTRIBUTORS"))
if err != nil || file == nil {
v.Warning("CONTRIBUTORS file is missing")
return []string{"MISSING CONTRIBUTOR FILES!"}