generated from dave/wails-template
Implement game path manipulation
This commit is contained in:
4
addon.go
4
addon.go
@@ -111,7 +111,7 @@ func (a *Addon) Update(body []byte) (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
localPath := filepath.Join(gamePath, "Interface", "AddOns", file.Name)
|
||||
localPath := filepath.Join(settings.GamePath, "Interface", "AddOns", file.Name)
|
||||
log.Printf("Updating file %s", localPath)
|
||||
err = UpdateFile(localPath, fileData)
|
||||
if err != nil {
|
||||
@@ -124,7 +124,7 @@ func (a *Addon) Update(body []byte) (err error) {
|
||||
return nil
|
||||
}
|
||||
func (a *Addon) GetLocalTocPath() string {
|
||||
return filepath.Join(gamePath, "Interface", "AddOns", a.Name, a.Name+".toc")
|
||||
return filepath.Join(settings.GamePath, "Interface", "AddOns", a.Name, a.Name+".toc")
|
||||
}
|
||||
func (a *Addon) GetRemoteVersion() (version string, err error) {
|
||||
url := a.GetRemoteTocURL()
|
||||
|
||||
Reference in New Issue
Block a user