diff --git a/app/cli-acx/src/main/java/io/github/applecommander/acx/command/ImportCommand.java b/app/cli-acx/src/main/java/io/github/applecommander/acx/command/ImportCommand.java index 0ce0e37..070da73 100644 --- a/app/cli-acx/src/main/java/io/github/applecommander/acx/command/ImportCommand.java +++ b/app/cli-acx/src/main/java/io/github/applecommander/acx/command/ImportCommand.java @@ -301,13 +301,16 @@ public class ImportCommand extends ReadWriteDiskCommandOptions { } ProdosFileInfo info = as.getProdosFileInfo(); String fileType = ProdosFormatDisk.getFiletype(info.getFileType()); - + OverrideFileEntryReader.Builder builder = OverrideFileEntryReader.builder(); builder.filename(Optional.ofNullable(as.getRealName())); + builder.prodosFiletype(fileType); + builder.locked((info.getAccess()&0xc2) != 0xc2); //Unlocked if destroy, rename and write are all enabled builder.fileData(as.getDataFork()); builder.resourceData(Optional.ofNullable(as.getResourceFork())); - builder.prodosFiletype(fileType); - builder.locked((info.getAccess()&0xc2) != 0xc2); //Unlocked if destory, rename and write are all enabled + if (ProdosFormatDisk.fileTypeNeedsAddress(fileType)) { + builder.binaryAddress(info.getAuxType()); + } builder.auxiliaryType(info.getAuxType()); if (as.getFileDatesInfo() != null) { diff --git a/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java b/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java index 6b89c30..5686ab1 100644 --- a/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java +++ b/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java @@ -1286,7 +1286,7 @@ public class ProdosFormatDisk extends FormattedDisk { /** * Locate the associated ProdosFileType. */ - public static ProdosFileType findFileType(String filetype) { + static ProdosFileType findFileType(String filetype) { for (int i=0; i