mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2026-01-22 17:16:11 +00:00
Ensuring the DosFileEntry is zeroed out when creating a new file. 'acx' actually pays attention to the file attributes. #192
This commit is contained in:
@@ -229,7 +229,11 @@ public class DosFormatDisk extends FormattedDisk {
|
||||
while (offset < 0xff) { // iterate through all entries
|
||||
int value = AppleUtil.getUnsignedByte(catalogSector[offset]);
|
||||
if (value == 0 || value == 0xff) {
|
||||
return new DosFileEntry(this, track, sector, offset);
|
||||
DosFileEntry fileEntry = new DosFileEntry(this, track, sector, offset);
|
||||
byte[] entry = fileEntry.readFileEntry();
|
||||
Arrays.fill(entry, (byte)0);
|
||||
fileEntry.writeFileEntry(entry);
|
||||
return fileEntry;
|
||||
}
|
||||
offset+= DosFileEntry.FILE_DESCRIPTIVE_ENTRY_LENGTH;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user