mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-12-01 09:50:32 +00:00
parentPointer bug
This commit is contained in:
parent
8cdda92146
commit
d0bfde2e80
@ -66,7 +66,7 @@ public class RootFolderData implements RootDirectoryChangeListener
|
|||||||
btnOK = new JButton ("OK");
|
btnOK = new JButton ("OK");
|
||||||
|
|
||||||
progressPanel = new ProgressPanel ();
|
progressPanel = new ProgressPanel ();
|
||||||
progressPanel.setPreferredSize (new Dimension (560, 340));
|
progressPanel.setPreferredSize (new Dimension (560, 380));
|
||||||
|
|
||||||
dialogTotals = new JFrame ("Disk Totals");
|
dialogTotals = new JFrame ("Disk Totals");
|
||||||
dialogTotals.add (progressPanel, BorderLayout.CENTER);
|
dialogTotals.add (progressPanel, BorderLayout.CENTER);
|
||||||
|
@ -159,8 +159,6 @@ public class ProdosDisk
|
|||||||
if (fileEntry != null)
|
if (fileEntry != null)
|
||||||
{
|
{
|
||||||
fileEntry.fileName = fileName;
|
fileEntry.fileName = fileName;
|
||||||
fileEntry.creationDate = LocalDateTime.now ();
|
|
||||||
fileEntry.modifiedDate = LocalDateTime.now ();
|
|
||||||
fileEntry.version = 0x00;
|
fileEntry.version = 0x00;
|
||||||
fileEntry.minVersion = 0x00;
|
fileEntry.minVersion = 0x00;
|
||||||
fileEntry.headerPointer = catalogBlockNo;
|
fileEntry.headerPointer = catalogBlockNo;
|
||||||
@ -257,7 +255,7 @@ public class ProdosDisk
|
|||||||
subdirectoryHeader.fileName = name;
|
subdirectoryHeader.fileName = name;
|
||||||
subdirectoryHeader.creationDate = LocalDateTime.now ();
|
subdirectoryHeader.creationDate = LocalDateTime.now ();
|
||||||
subdirectoryHeader.fileCount = 0;
|
subdirectoryHeader.fileCount = 0;
|
||||||
subdirectoryHeader.parentPointer = blockNo;
|
subdirectoryHeader.parentPointer = fileEntry.ptr / BLOCK_SIZE;
|
||||||
subdirectoryHeader.parentEntry =
|
subdirectoryHeader.parentEntry =
|
||||||
(byte) (((fileEntry.ptr % BLOCK_SIZE) - 4) / ENTRY_SIZE + 1);
|
(byte) (((fileEntry.ptr % BLOCK_SIZE) - 4) / ENTRY_SIZE + 1);
|
||||||
|
|
||||||
|
@ -56,8 +56,6 @@ public class SubdirectoryHeader extends DirectoryHeader
|
|||||||
writeShort (buffer, ptr + 0x23, parentPointer);
|
writeShort (buffer, ptr + 0x23, parentPointer);
|
||||||
buffer[ptr + 0x25] = parentEntry;
|
buffer[ptr + 0x25] = parentEntry;
|
||||||
buffer[ptr + 0x26] = parentEntryLength;
|
buffer[ptr + 0x26] = parentEntryLength;
|
||||||
|
|
||||||
assert parentPointer > 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
|
@ -125,7 +125,7 @@ public class NuFX
|
|||||||
LocalDateTime modified = record.getModified ();
|
LocalDateTime modified = record.getModified ();
|
||||||
byte[] buffer = record.getData ();
|
byte[] buffer = record.getData ();
|
||||||
|
|
||||||
if (false)
|
if (debug)
|
||||||
System.out.printf ("%3d %-35s %02X %,7d %,7d %,7d %s %s%n", ++count,
|
System.out.printf ("%3d %-35s %02X %,7d %,7d %,7d %s %s%n", ++count,
|
||||||
fileName, fileType, auxType, eof, buffer.length, created, modified);
|
fileName, fileType, auxType, eof, buffer.length, created, modified);
|
||||||
|
|
||||||
@ -258,8 +258,8 @@ public class NuFX
|
|||||||
private String getVolumeName ()
|
private String getVolumeName ()
|
||||||
// -------------------------------------------------------------------------------//
|
// -------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
if (true)
|
// if (true)
|
||||||
return volumeName;
|
// return volumeName;
|
||||||
|
|
||||||
if (rootContainsFiles)
|
if (rootContainsFiles)
|
||||||
return volumeName;
|
return volumeName;
|
||||||
@ -270,7 +270,6 @@ public class NuFX
|
|||||||
if (pos > 0)
|
if (pos > 0)
|
||||||
{
|
{
|
||||||
String firstPath = paths.get (0).substring (0, pos + 1);
|
String firstPath = paths.get (0).substring (0, pos + 1);
|
||||||
System.out.println (firstPath);
|
|
||||||
|
|
||||||
boolean allSame = true;
|
boolean allSame = true;
|
||||||
for (String pathName : paths)
|
for (String pathName : paths)
|
||||||
|
Loading…
Reference in New Issue
Block a user