Prevent NDIF from identifying obsolete UDIF images.

This commit is contained in:
2021-06-04 15:59:39 +01:00
parent 3215795dd5
commit 8167fcc4fc

View File

@@ -31,6 +31,7 @@
// ****************************************************************************/
using System;
using System.IO;
using Aaru.CommonTypes.Interfaces;
using Claunia.RsrcFork;
@@ -53,6 +54,13 @@ namespace Aaru.DiscImages
Resource rsrc = rsrcFork.GetResource(NDIF_RESOURCE);
Stream dataFork = imageFilter.GetDataForkStream();
byte[] udifMagic = new byte[4];
dataFork.Read(udifMagic, 0, 4);
if(BitConverter.ToUInt32(udifMagic, 0) == 0x796C6F6B)
return false;
if(rsrc.ContainsId(NDIF_RESOURCEID))
return true;
}