From a4d9c5e7468ddd6862953c0f6aec00466192669a Mon Sep 17 00:00:00 2001 From: Rob Greene Date: Tue, 21 Jun 2022 20:07:10 -0500 Subject: [PATCH] Read support for GS/OS filename upper/lower-case support. --- .../storage/os/prodos/ProdosFileEntry.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFileEntry.java b/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFileEntry.java index 820dffd..060391d 100644 --- a/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFileEntry.java +++ b/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFileEntry.java @@ -106,6 +106,25 @@ public class ProdosFileEntry extends ProdosCommonEntry implements FileEntry { } fileName = mixedCase.toString(); } + // GS/OS upper/lower case mix + if ((getMinimumProdosVersion() & 0x80) != 0) { + int flags = getMinimumProdosVersion() << 8 | getProdosVersion(); + int bit = 1 << 14; // 1st bit in 16 bit number is enablement flag, so skipping it + StringBuffer mixedCase = new StringBuffer(fileName); + for (int i=0; i<16 && i>= 1; + } + fileName = mixedCase.toString(); + } return fileName; }