1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-16 17:35:57 -05:00

Initialise config.path in case of MPQ error

Fixes #1096
This commit is contained in:
Panagiotis Georgiadis 2021-03-24 03:58:45 +01:00
parent 536233ffee
commit 268e65b309
No known key found for this signature in database
GPG Key ID: A5B9AF563B15B24F
2 changed files with 4 additions and 3 deletions

View File

@ -241,6 +241,7 @@ func (a *App) LoadConfig() (*d2config.Configuration, error) {
configAsset, _ := a.asset.LoadAsset(configBaseName)
config := &d2config.Configuration{}
config.SetPath(d2config.DefaultConfigPath())
// create the default if not found
if configAsset == nil {

View File

@ -54,11 +54,11 @@ func (a *App) initialize() error {
}
const (
fmtErrSourceNotFound = `file not found: %s
fmtErrSourceNotFound = `file not found: %q
Please check your config file at %s
Please check your config file at %q
Also, verify that the MPQ files exist at %s
Also, verify that the MPQ files exist at %q
Capitalization in the file name matters.
`