Bugfix: clean zip file before overwriting

This commit is contained in:
Neshura 2025-02-18 22:37:57 +01:00
parent 8c97c93b34
commit cfaec3a4fd
Signed by: Neshura
GPG key ID: 4E2D47B1374C297D

View file

@ -369,6 +369,12 @@ func DownloadAndProcessEpub(jnovel jnc.Api, serie jnc.SerieAugmented, volume jnc
zipPath := basePath + "Chapter " + chap.chDisplay + ".cbz"
if _, err = os.Stat(zipPath); err != nil {
err := os.Remove(zipPath)
if err != nil {
return
}
}
newZipFile, err := os.Create(zipPath)
if err != nil {
panic(err)