* FileSystemIDandChk/DateHandlers.cs:

Lisa epoch is 1901 not 1904

	* FileSystemIDandChk/Plugins/LisaFS.cs:
	  Typos corrected, now works perfectly

git-svn-id: svn://claunia.com/FileSystemIDandChk@36 17725271-3d32-4980-a8cb-9ff532f270ba
This commit is contained in:
2014-04-17 17:13:44 +00:00
parent 2290774958
commit 7b4af21358
3 changed files with 13 additions and 5 deletions

View File

@@ -1,3 +1,11 @@
2014-04-17 Natalia Portillo <claunia@claunia.com>
* DateHandlers.cs:
Lisa epoch is 1901 not 1904
* Plugins/LisaFS.cs:
Typos corrected, now works perfectly
2014-04-17 Natalia Portillo <claunia@claunia.com> 2014-04-17 Natalia Portillo <claunia@claunia.com>
* DateHandlers.cs: * DateHandlers.cs:

View File

@@ -4,7 +4,7 @@ namespace FileSystemIDandChk
{ {
public static class DateHandlers 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 MacEpoch = new DateTime(1904, 1, 1, 0, 0, 0);
static readonly DateTime UNIXEpoch = new DateTime(1970, 1, 1, 0, 0, 0); static readonly DateTime UNIXEpoch = new DateTime(1970, 1, 1, 0, 0, 0);
// Day 0 of Julian Date system // Day 0 of Julian Date system

View File

@@ -45,7 +45,7 @@ namespace FileSystemIDandChk.Plugins
for (int i = 0; i < 100; i++) for (int i = 0; i < 100; i++)
{ {
byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag); byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag);
UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x02); UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x04);
if (MainClass.isDebug) if (MainClass.isDebug)
Console.WriteLine("DEBUG (LisaFS plugin): Sector {0}, file ID 0x{1:X4}", i, fileid); 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) if (mddf.mddf_block != i)
return false; return false;
if (mddf.vol_size < imagePlugin.GetSectors()) if (mddf.vol_size > imagePlugin.GetSectors())
return false; return false;
if (mddf.vol_size - 1 != mddf.volsize_minus_one) if (mddf.vol_size - 1 != mddf.volsize_minus_one)
@@ -128,7 +128,7 @@ namespace FileSystemIDandChk.Plugins
for (int i = 0; i < 100; i++) for (int i = 0; i < 100; i++)
{ {
byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag); byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag);
UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x02); UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x04);
if (MainClass.isDebug) if (MainClass.isDebug)
Console.WriteLine("DEBUG (LisaFS plugin): Sector {0}, file ID 0x{1:X4}", i, fileid); 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) if (mddf.mddf_block != i)
return; return;
if (mddf.vol_size < imagePlugin.GetSectors()) if (mddf.vol_size > imagePlugin.GetSectors())
return; return;
if (mddf.vol_size - 1 != mddf.volsize_minus_one) if (mddf.vol_size - 1 != mddf.volsize_minus_one)