On 1/28/25 7:50 AM, Edgar Gilbert wrote:
> Inno setup detects that a file is corrupted and tells you the name of the
> file that it was trying to install, but it does not tell you the name of
> the .bin file that it was reading when the error occurred. In a large
> installation that has more than 100 .bin files, the user has no idea which
> one is corrupted.
A file can span multiple slices, though. When a file is found to have
the wrong hash after extraction, Setup doesn't know where within the
compressed stream the corruption is located, and thus can't reliably
report which slice is corrupted. And if solid compression is enabled,
Setup doesn't know which slices contain each file, because by default
all files are compressed into a single stream that spans all slices.
Also, decompression algorithms may buffer large amounts of input in
advance. Slice 2 might be the most recently accessed slice on disk, but
the corrupted file could have come from slice 1 content that was
buffered earlier.
In order to know which slices are corrupted, there would need to be hash
checks of the slices themselves (i.e., pre-decompression), not just hash
checks of the extracted files (post-decompression). This is something
I've considered, but it probably won't happen in the near future.
Actually, Setup does know when a slice file is the wrong size (e.g., an
incomplete download), so in that specific case it could display a
filename. That may be the most common form of "corruption". Files
downloaded over HTTPS already get checksummed in transit, so seeing bit
flips within the slice files should be extremely rare (unless there's a
hardware problem).
-JR