gen2brain / cbconvert

CBconvert is a Comic Book converter
GNU General Public License v3.0
176 stars 11 forks source link

Cover extraction of cbz files with a single top level folder causes error #19

Closed Loriloio closed 1 year ago

Loriloio commented 1 year ago

From release 0.7.0 onwards, the cover extraction of cbz files that do only contain a single top level folder, which contains all the images, leads to following error message: extractCover: coverImage: unarr: Entry not found

The following command line was used: cbconvert.exe cover "C:\Test\Test.cbz" --outdir="C:\Test" The same command line works with release 0.6.0 and the same files. After moving the images in the cbz file up and out of the folder and the deleting the now empty folder, the same command line works in newer releases as well.

I hope this regression can be fixed, since many cbz files I own have this type of folder structure.

gen2brain commented 1 year ago

I cannot reproduce this, I tried with an archive with a single top dir, and one with a sub dir, and the cover works with both archives. Can you share a file or an excerpt of a file that can be used to reproduce this? I guess it is more related to file naming and coverName() function.

Loriloio commented 1 year ago

I included two test files containing two white images each. Test4.cbz contains a top level folder, while Test5.cbz does not. Cover extraction works for me for Test5.cbz with cbconvert 0.6.0 and 0.7.0, while it fails with above mentioned error message with Test4.cbz and cbconvert 0.7.0, but works with 0.6.0. Tests.zip

gen2brain commented 1 year ago

Sorry, just tested with your files. Again, I cannot reproduce it in Linux, it is probably something in unarr (or my Go bindings) platform specific. I will have to test it on Windows and see there.

gen2brain commented 1 year ago

This should be fixed in https://github.com/gen2brain/cbconvert/commit/d47c1c1464e790d7e4e868f11d8ac0bdf5b01a0a. New release is uploaded.

Loriloio commented 1 year ago

Thank you! I just tested the new release and it works like a charm.