adding name trimming feature in //// comments for future use

This commit is contained in:
attractivo
2016-05-21 15:04:33 +02:00
parent 3fe787dc61
commit c0950ca55a

View File

@@ -125,11 +125,17 @@ namespace SabreTools.Helper
// If we didn't find any items in the folder, make sure to add the blank rom
if (empty)
{
string tempgame = String.Join("\\", parent);
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
////tempgame = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempgame).Groups[1].Value;
////tempgame = tempgame.TrimStart().TrimEnd();
RomData rom = new RomData
{
Type = "rom",
Name = "null",
Game = String.Join("\\", parent),
Game = tempgame,
Size = -1,
CRC = "null",
MD5 = "null",
@@ -509,6 +515,9 @@ namespace SabreTools.Helper
logger.Warning("Incomplete entry for \"" + subreader.GetAttribute("name") + "\" will be output as nodump");
nodump = true;
}
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
////tempname = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempname).Groups[1].Value;
////tempname = tempname.TrimStart().TrimEnd();
// Only add the rom if there's useful information in it
if (!(crc == "" && md5 == "" && sha1 == "") || nodump)
@@ -559,6 +568,10 @@ namespace SabreTools.Helper
{
tempname = (parent.Count > 0 ? String.Join("\\", parent) + Path.DirectorySeparatorChar : "") + tempname;
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
////tempname = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempname).Groups[1].Value;
////tempname = tempname.TrimEnd().TrimStart();
RomData rom = new RomData
{
Type = "rom",
@@ -718,6 +731,10 @@ namespace SabreTools.Helper
}
}
///WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
////tempname = new Regex(@"(([[(].*[\)\]] )?([^([]+))").Match(tempname).Groups[1].Value;
////tempname = tempname.TrimEnd().TrimStart();
// Only add the rom if there's useful information in it
if (!(crc == "" && md5 == "" && sha1 == "") || nodump)
{