Add skip on nodump

This commit is contained in:
Matt Nadareski
2016-05-06 10:59:05 -07:00
parent 53cfcd19ed
commit ced41c5cde

View File

@@ -447,6 +447,12 @@ namespace SabreTools.Helper
{
case "rom":
case "disk":
// If the rom is nodump, skip it
if (xtr.GetAttribute("flags") == "nodump" || xtr.GetAttribute("status") == "nodump")
{
break;
}
// Take care of hex-sized files
long size = -1;
if (xtr.GetAttribute("size") != null && xtr.GetAttribute("size").Contains("0x"))
@@ -469,6 +475,9 @@ namespace SabreTools.Helper
sha1 = (sha1.StartsWith("0x") ? sha1.Remove(0, 2) : sha1);
sha1 = (sha1 == "-" ? "" : sha1);
// Only add the rom if there's useful information in it
if (!(crc == "" && md5 == "" && sha1 == ""))
{
// Get the new values to add
string key = crc + "-" + size;
RomData value = new RomData
@@ -495,6 +504,7 @@ namespace SabreTools.Helper
newvalue.Add(value);
dict.Add(key, newvalue);
}
}
break;
}
}