Advanced settings FAT modification: fix expanding directory

When no more directory entries are available in the existing
cluster(s) of a directory on FAT32, we allocate an
extra cluster.
Make sure to zero out that new cluster, as disk checking utilities
may not stop reading when reaching an end of directory marker but
read the rest of cluster as well.
So there must not be any garbage data from a previously deleted file
in the sector there.

Also add checks to prevent getting in an endless loop on
encoutering circular "next cluster" references.
This commit is contained in:
Floris Bos 2022-11-20 18:44:22 +01:00
parent 2694f3976a
commit a403df4385
3 changed files with 24 additions and 4 deletions

2
debian/changelog vendored
View file

@ -8,7 +8,7 @@ rpi-imager (1.7.4) unstable; urgency=medium
disk device, without having to rely on the operating system
to mount the partition first.
-- Floris Bos <bos@je-eigen-domein.nl> Mon, 14 Nov 2022 21:49:27 +0100
-- Floris Bos <bos@je-eigen-domein.nl> Sun, 20 Nov 2022 17:30:20 +0100
rpi-imager (1.7.3) unstable; urgency=medium