mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Prevent NDIF from identifying obsolete UDIF images.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user