diff --git a/FileSystemIDandChk/ChangeLog b/FileSystemIDandChk/ChangeLog index 5a6bf29f..11d3dc78 100644 --- a/FileSystemIDandChk/ChangeLog +++ b/FileSystemIDandChk/ChangeLog @@ -1,3 +1,11 @@ +2014-04-17 Natalia Portillo + + * DateHandlers.cs: + Lisa epoch is 1901 not 1904 + + * Plugins/LisaFS.cs: + Typos corrected, now works perfectly + 2014-04-17 Natalia Portillo * DateHandlers.cs: diff --git a/FileSystemIDandChk/DateHandlers.cs b/FileSystemIDandChk/DateHandlers.cs index 9afb4c7a..f5bef956 100644 --- a/FileSystemIDandChk/DateHandlers.cs +++ b/FileSystemIDandChk/DateHandlers.cs @@ -4,7 +4,7 @@ namespace FileSystemIDandChk { public static class DateHandlers { - static readonly DateTime LisaEpoch = new DateTime(1904, 1, 1, 0, 0, 0); + static readonly DateTime LisaEpoch = new DateTime(1901, 1, 1, 0, 0, 0); static readonly DateTime MacEpoch = new DateTime(1904, 1, 1, 0, 0, 0); static readonly DateTime UNIXEpoch = new DateTime(1970, 1, 1, 0, 0, 0); // Day 0 of Julian Date system diff --git a/FileSystemIDandChk/Plugins/LisaFS.cs b/FileSystemIDandChk/Plugins/LisaFS.cs index 8a8e887b..7cddc557 100644 --- a/FileSystemIDandChk/Plugins/LisaFS.cs +++ b/FileSystemIDandChk/Plugins/LisaFS.cs @@ -45,7 +45,7 @@ namespace FileSystemIDandChk.Plugins for (int i = 0; i < 100; i++) { byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag); - UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x02); + UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x04); if (MainClass.isDebug) Console.WriteLine("DEBUG (LisaFS plugin): Sector {0}, file ID 0x{1:X4}", i, fileid); @@ -78,7 +78,7 @@ namespace FileSystemIDandChk.Plugins if (mddf.mddf_block != i) return false; - if (mddf.vol_size < imagePlugin.GetSectors()) + if (mddf.vol_size > imagePlugin.GetSectors()) return false; if (mddf.vol_size - 1 != mddf.volsize_minus_one) @@ -128,7 +128,7 @@ namespace FileSystemIDandChk.Plugins for (int i = 0; i < 100; i++) { byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag); - UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x02); + UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x04); if (MainClass.isDebug) Console.WriteLine("DEBUG (LisaFS plugin): Sector {0}, file ID 0x{1:X4}", i, fileid); @@ -267,7 +267,7 @@ namespace FileSystemIDandChk.Plugins if (mddf.mddf_block != i) return; - if (mddf.vol_size < imagePlugin.GetSectors()) + if (mddf.vol_size > imagePlugin.GetSectors()) return; if (mddf.vol_size - 1 != mddf.volsize_minus_one)