FIX: Fix bug hdiff
This commit is contained in:
@@ -2,15 +2,15 @@ package diffService
|
||||
|
||||
import (
|
||||
"firefly-launcher/pkg/constant"
|
||||
"firefly-launcher/pkg/verifier"
|
||||
"firefly-launcher/pkg/sevenzip"
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"io"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
)
|
||||
|
||||
func (h *DiffService) DataExtract(gamePath, patchPath string, isSkipVerify bool) (bool, string) {
|
||||
func (h *DiffService) DataExtract(gamePath, patchPath string) (bool, string) {
|
||||
os.RemoveAll(constant.TempUrl)
|
||||
if _, err := os.Stat(gamePath); err != nil {
|
||||
return false, err.Error()
|
||||
@@ -30,20 +30,7 @@ func (h *DiffService) DataExtract(gamePath, patchPath string, isSkipVerify bool)
|
||||
os.RemoveAll(constant.TempUrl)
|
||||
return false, err.Error()
|
||||
}
|
||||
|
||||
if !isSkipVerify {
|
||||
validator, err := verifier.NewVerifier(gamePath, constant.TempUrl)
|
||||
if err != nil {
|
||||
os.RemoveAll(constant.TempUrl)
|
||||
return false, err.Error()
|
||||
}
|
||||
|
||||
if err := validator.VerifyAll(); err != nil {
|
||||
os.RemoveAll(constant.TempUrl)
|
||||
return false, err.Error()
|
||||
}
|
||||
}
|
||||
return true, "validated"
|
||||
return true, "extract completed"
|
||||
}
|
||||
|
||||
func (h *DiffService) CutData(gamePath string) (bool, string) {
|
||||
@@ -97,4 +84,4 @@ func (h *DiffService) CutData(gamePath string) (bool, string) {
|
||||
}
|
||||
os.RemoveAll(constant.TempUrl)
|
||||
return true, "cut completed"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user