* Holger Levsen <hol...@layer-acht.org> [2024-04-11 02:14]:
> > unzip does seem to extract all the files, though it errors out.  Not sure 
> > what
> > diffoscope should do here.  This is definitely a broken ZIP file.  That bug
> > should probably be reported against libscout or whatever tooling it used to
> > create that JAR.
> 
> I agree it's more complicated, but fundamentally, diffoscope should *not* 
> crash
> here! (but rather report the broken zip file.)

I think we all agree it shouldn't crash :)

What I meant is that I'm not sure it should simply catch the error, report the
file as broken, and not attempt extraction, or if it makes sense to attempt to
work around this issue, at least in cases like this specific one where the
entries are exact duplicates and the files can presumably be safely extracted.
I think my workaround (which could be implemented slightly differently as well,
without modifying the ZipFile, but processing it differently in diffoscope)
would accomplish that for this JAR at least.  I could make an MR for that.
Though as I said I will also report this upstream to cpython, probably tomorrow.

- Fay

Reply via email to