Implement game path manipulation

This commit is contained in:
2025-01-11 23:19:45 +01:00
parent c975aee3cb
commit 156c5770e8
3 changed files with 33 additions and 6 deletions

View File

@@ -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()