UPDATE: update to go 1.25
This commit is contained in:
@@ -116,7 +116,7 @@ func (h *HdiffzService) CutData(gamePath string) (bool, string) {
|
||||
return err
|
||||
}
|
||||
destPath := filepath.Join(gamePath, relPath)
|
||||
application.Get().EmitEvent("hdiffz:message", map[string]string{"message": destPath})
|
||||
application.Get().Event.Emit("hdiffz:message", map[string]string{"message": destPath})
|
||||
if info.IsDir() {
|
||||
return os.MkdirAll(destPath, os.ModePerm)
|
||||
}
|
||||
@@ -189,7 +189,7 @@ func (h *HdiffzService) PatchData(gamePath string) (bool, string) {
|
||||
}
|
||||
|
||||
for i, entry := range jsonData.DiffMap {
|
||||
application.Get().EmitEvent(
|
||||
application.Get().Event.Emit(
|
||||
"hdiffz:progress", map[string]int{
|
||||
"progress": i,
|
||||
"maxProgress": len(jsonData.DiffMap),
|
||||
@@ -262,7 +262,7 @@ func (h *HdiffzService) DeleteFiles(gamePath string) (bool, string) {
|
||||
|
||||
for i, file := range deleteFiles {
|
||||
os.Remove(filepath.Join(gamePath, file))
|
||||
application.Get().EmitEvent("hdiffz:progress", map[string]int{"progress": i, "maxProgress": len(deleteFiles)})
|
||||
application.Get().Event.Emit("hdiffz:progress", map[string]int{"progress": i, "maxProgress": len(deleteFiles)})
|
||||
}
|
||||
_ = os.Remove(filepath.Join(gamePath, "deletefiles.txt"))
|
||||
return true, ""
|
||||
|
||||
Reference in New Issue
Block a user