mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
Fixed filetype initialization; getFiles now tests if a file entry is empty
(in which case it is not returned); createFile now checks for deleted files and re-uses the file entry.
This commit is contained in:
parent
4652ac9f63
commit
c37fb4307a
@ -133,8 +133,8 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
if (string == null || string.length() == 0) {
|
||||
string = "$" + byt.toUpperCase();
|
||||
}
|
||||
boolean addressRequired = Boolean.getBoolean(
|
||||
(String) properties.get("filetype." + byt + ".addres"));
|
||||
boolean addressRequired = Boolean.valueOf((String) properties.get(
|
||||
"filetype." + byt + ".address")).booleanValue();
|
||||
fileTypes[i] = new ProdosFileType((byte)i, string, addressRequired);
|
||||
}
|
||||
} catch (IOException ignored) {
|
||||
@ -178,7 +178,7 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
int offset = 4;
|
||||
while (offset+ProdosCommonEntry.ENTRY_LENGTH < BLOCK_SIZE) {
|
||||
int value = AppleUtil.getUnsignedByte(block[offset]);
|
||||
if (value == 0) {
|
||||
if ((value & 0xf0) == 0) {
|
||||
ProdosFileEntry fileEntry =
|
||||
new ProdosFileEntry(this, blockNumber, offset);
|
||||
fileEntry.setCreationDate(new Date());
|
||||
@ -222,7 +222,7 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
new ProdosCommonEntry(this, blockNumber, offset);
|
||||
if (tester.isVolumeHeader() || tester.isSubdirectoryHeader()) {
|
||||
// ignore it, we've already got it
|
||||
} else {
|
||||
} else if (!tester.isEmpty()) {
|
||||
ProdosFileEntry fileEntry =
|
||||
new ProdosFileEntry(this, blockNumber, offset);
|
||||
files.add(fileEntry);
|
||||
|
Loading…
Reference in New Issue
Block a user