[DatFile] Fix some issues with missfile write

This commit is contained in:
Matt Nadareski
2017-03-14 10:40:36 -07:00
parent 3dccdd7138
commit 0bd2c3b84e

View File

@@ -995,6 +995,9 @@ namespace SabreTools.Helper.Dats
.Replace("%crc%", string.Empty) .Replace("%crc%", string.Empty)
.Replace("%md5%", string.Empty) .Replace("%md5%", string.Empty)
.Replace("%sha1%", string.Empty) .Replace("%sha1%", string.Empty)
.Replace("%sha256%", string.Empty)
.Replace("%sha384%", string.Empty)
.Replace("%sha512%", string.Empty)
.Replace("%size%", string.Empty); .Replace("%size%", string.Empty);
post = post post = post
.Replace("%game%", rom.Machine.Name) .Replace("%game%", rom.Machine.Name)
@@ -1002,6 +1005,9 @@ namespace SabreTools.Helper.Dats
.Replace("%crc%", string.Empty) .Replace("%crc%", string.Empty)
.Replace("%md5%", string.Empty) .Replace("%md5%", string.Empty)
.Replace("%sha1%", string.Empty) .Replace("%sha1%", string.Empty)
.Replace("%sha256%", string.Empty)
.Replace("%sha384%", string.Empty)
.Replace("%sha512%", string.Empty)
.Replace("%size%", string.Empty); .Replace("%size%", string.Empty);
} }
@@ -1037,6 +1043,8 @@ namespace SabreTools.Helper.Dats
} }
// Otherwise, use any flags // Otherwise, use any flags
else
{
name = (UseGame ? rom.Machine.Name : rom.Name); name = (UseGame ? rom.Machine.Name : rom.Name);
if (RepExt != "" || RemExt) if (RepExt != "" || RemExt)
{ {
@@ -1067,6 +1075,8 @@ namespace SabreTools.Helper.Dats
{ {
state += pre + name + post + "\n"; state += pre + name + post + "\n";
} }
}
break; break;
case DatFormat.OfflineList: case DatFormat.OfflineList:
state += "\t\t<game>\n" state += "\t\t<game>\n"