Add fall back with 7zip

This commit is contained in:
2025-09-02 18:37:30 +07:00
parent cf9d499e91
commit c26ecf70fe
3 changed files with 25 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
APP_NAME = ldff-converter.exe
APP_NAME = ldiff-converter.exe
all: build

View File

@@ -144,6 +144,14 @@ func main() {
fmt.Fprintln(os.Stderr, "error zip hdiff:", err)
os.Exit(1)
}
if _, err := os.Stat(hdiff); os.IsNotExist(err) {
fmt.Println("File not found, retrying...")
if err := ZipWith7za(hdiffFolderPath, hdiff); err != nil {
fmt.Println("Retry failed:", err)
os.Exit(1)
}
}
fmt.Println("Zipping hdiff files done.")
fmt.Println("Removing hdiff temp files...")