diff --git a/src/com/bytezone/diskbrowser/disk/DiskFactory.java b/src/com/bytezone/diskbrowser/disk/DiskFactory.java index 5a38cd5..d2a7c77 100755 --- a/src/com/bytezone/diskbrowser/disk/DiskFactory.java +++ b/src/com/bytezone/diskbrowser/disk/DiskFactory.java @@ -201,20 +201,6 @@ public class DiskFactory return disk; } - if (file.length () == 819200) // 800K 3.5" - { - if (debug) - System.out.println ("UniDos ?"); - // 2 x 400k disk images - AppleDisk appleDisk1 = new AppleDisk (file, 50, 32); - AppleDisk appleDisk2 = new AppleDisk (file, 50, 32, 409600); - disk = checkUnidos (appleDisk1, 1); - disk2 = checkUnidos (appleDisk2, 2); - assert disk != disk2; - if (disk != null && disk2 != null) - return new DualDosDisk (disk, disk2); - } - if (debug) System.out.println (" Checking po or dsk hard drive: " + file.length ()); @@ -226,6 +212,19 @@ public class DiskFactory return disk; } + if (file.length () == 819200) // 800K 3.5" + { + if (debug) + System.out.println ("UniDos ?"); + // 2 x 400k disk images + AppleDisk appleDisk1 = new AppleDisk (file, 50, 32); + AppleDisk appleDisk2 = new AppleDisk (file, 50, 32, (int) (file.length () / 2)); + disk = checkUnidos (appleDisk1, 1); + disk2 = checkUnidos (appleDisk2, 2); + if (disk != null && disk2 != null) + return new DualDosDisk (disk, disk2); + } + if (debug) System.out.println (" Creating a data disk from bad length"); diff --git a/src/com/bytezone/diskbrowser/disk/DualDosDisk.java b/src/com/bytezone/diskbrowser/disk/DualDosDisk.java index a542fad..4a3a0d2 100755 --- a/src/com/bytezone/diskbrowser/disk/DualDosDisk.java +++ b/src/com/bytezone/diskbrowser/disk/DualDosDisk.java @@ -136,6 +136,8 @@ public class DualDosDisk implements FormattedDisk currentDisk = 0; else if (disks[1] == fd) currentDisk = 1; + else + System.out.println ("Disk not found: " + fd); } // ---------------------------------------------------------------------------------// diff --git a/src/com/bytezone/diskbrowser/gui/AppleDiskTab.java b/src/com/bytezone/diskbrowser/gui/AppleDiskTab.java index ff95356..ab92c51 100755 --- a/src/com/bytezone/diskbrowser/gui/AppleDiskTab.java +++ b/src/com/bytezone/diskbrowser/gui/AppleDiskTab.java @@ -128,7 +128,7 @@ class AppleDiskTab extends AbstractTab { DefaultMutableTreeNode rootNode = getRootNode (); - // check for multi-volume disk + // check for multi-volume disk (only search the current branch) FormattedDisk fd = ((AppleFileSource) rootNode.getUserObject ()).getFormattedDisk (); if (fd instanceof DualDosDisk) { diff --git a/src/com/bytezone/diskbrowser/gui/DataPanel.java b/src/com/bytezone/diskbrowser/gui/DataPanel.java index 6a4d3a1..fa9d3e4 100755 --- a/src/com/bytezone/diskbrowser/gui/DataPanel.java +++ b/src/com/bytezone/diskbrowser/gui/DataPanel.java @@ -250,7 +250,7 @@ class DataPanel extends JTabbedPane switch (getSelectedIndex ()) { - case 0: // Formated/Image + case 0: // Formatted/Image try { setText (formattedText, dataSource.getText ()); diff --git a/src/com/bytezone/diskbrowser/gui/TreeBuilder.java b/src/com/bytezone/diskbrowser/gui/TreeBuilder.java index b8af6ab..cfa108c 100755 --- a/src/com/bytezone/diskbrowser/gui/TreeBuilder.java +++ b/src/com/bytezone/diskbrowser/gui/TreeBuilder.java @@ -208,6 +208,8 @@ public class TreeBuilder File[] files = file.listFiles (); if (files != null) + { + Arrays.sort (files, fileComparator); for (File f : files) { if (f.isHidden ()) @@ -222,6 +224,7 @@ public class TreeBuilder f.isDirectory () ? "D" : " ", name, sdf.format (d).replace (".", ""), size, type)); } + } if (text.length () > 0) text.deleteCharAt (text.length () - 1);