This should allow a DOS 3.3 disk to "translate" TXT and BIN properly.

Admittedly, this is a bit of a hack, but a number of sources do come
from ProDOS, so it allows translation.
This commit is contained in:
Rob Greene 2018-03-02 17:26:46 -06:00
parent 93e7607541
commit f8dee76cd5

View File

@ -152,14 +152,15 @@ public class DosFileEntry implements FileEntry {
}
/**
* Set the filetype.
* Set the filetype. This contains some ProDOS file type translation to support
* translation from an AppleSingle archive.
*/
public void setFiletype(String filetype) {
byte[] data = readFileEntry();
int type = 0x04; // assume binary
if ("T".equals(filetype)) type = 0x00; //$NON-NLS-1$
if ("T".equals(filetype) || "TXT".equals(filetype)) type = 0x00; //$NON-NLS-1$
if ("I".equals(filetype)) type = 0x01; //$NON-NLS-1$
if ("A".equals(filetype)) type = 0x02; //$NON-NLS-1$
if ("A".equals(filetype) || "BAS".equals(filetype)) type = 0x02; //$NON-NLS-1$
if ("B".equals(filetype)) type = 0x04; //$NON-NLS-1$
if ("S".equals(filetype)) type = 0x08; //$NON-NLS-1$
if ("R".equals(filetype)) type = 0x10; //$NON-NLS-1$