Commit graph

3 commits

Author SHA1 Message Date
Marcel Petrick
829c200fd1 code-quality: fixed all range-loop warnings which were reported from clazy.
See: `rpi-imager/src/downloadthread.cpp:1015:14: warning: Missing reference in range-for with non trivial type (QByteArray) [clazy-range-loop]`
2022-06-08 17:54:06 +02:00
Floris Bos
c00a451f6c gz/xz/zstd custom images: pad if image size is not dividable by 512 bytes
Disk image sizes that are not dividable by 512 bytes should not
exist, as that is the minimum sector size any disk can have, and
the smallest unit an OS can write to a disk.

We were already rejecting such image files if we know in advance
the size was wrong, which we can test if they are uncompressed,
if they are in an easy parsable file format such as .zip, or if
the repository meta data indicated the uncompressed size.

However for gz/xz/zstd files this check is not done, and it would
fail at the verification stage instead.
If encountering such corner case, pad the image instead of
failing.

Ref #364
2022-02-16 12:17:40 +01:00
Floris Bos
033ff07abf Move source files to /src 2022-02-14 10:07:15 +01:00
Renamed from downloadextractthread.cpp (Browse further)