mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
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:
parent
2694f3976a
commit
a403df4385
3 changed files with 24 additions and 4 deletions
|
@ -31,6 +31,7 @@ protected:
|
|||
uint32_t _fat32_firstRootDirCluster, _fat32_currentRootDirCluster;
|
||||
uint16_t _bytesPerSector, _fat32_fsinfoSector;
|
||||
QList<uint32_t> _fatStartOffset;
|
||||
QList<uint32_t> _currentDirClusters;
|
||||
|
||||
QList<uint32_t> getClusterChain(uint32_t firstCluster);
|
||||
void setFAT16(uint16_t cluster, uint16_t value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue