Skip to content

Commit

Permalink
No forward slashes in filepath.Join to satisfy golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
willroberts committed Mar 24, 2021
1 parent b18a70c commit d1c1e8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion d2core/d2config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down
2 changes: 1 addition & 1 deletion d2core/d2hero/hero_state_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion d2game/d2gamescreen/credits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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!"}
Expand Down

0 comments on commit d1c1e8b

Please sign in to comment.