[DatFIle] If roms end with directory separators, keep them

There are weird cases where directories are wanted during parsing. We shouldn't be filtering them out unless people specifically remove them.
This commit is contained in:
Matt Nadareski
2018-02-08 00:40:58 -08:00
parent f1284dee33
commit a44783b4f7

View File

@@ -3279,6 +3279,11 @@ namespace SabreTools.Library.DatFiles
/// <returns>The key for the item</returns> /// <returns>The key for the item</returns>
public string ParseAddHelper(DatItem item, bool clean, bool remUnicode) public string ParseAddHelper(DatItem item, bool clean, bool remUnicode)
{ {
if (item.Name == "3DMaze/WINDOWS/TEMP/")
{
Console.WriteLine();
}
string key = ""; string key = "";
// If there's no name in the rom, we log and skip it // If there's no name in the rom, we log and skip it
@@ -3288,13 +3293,6 @@ namespace SabreTools.Library.DatFiles
return key; return key;
} }
// If the name ends with a directory separator, we log and skip it (DOSCenter only?)
if (item.Name.EndsWith("/") || item.Name.EndsWith("\\"))
{
Globals.Logger.Warning("{0}: Rom ending with directory separator found: '{1}'. Skipping...", FileName, item.Name);
return key;
}
// If we're in cleaning mode, sanitize the game name // If we're in cleaning mode, sanitize the game name
item.MachineName = (clean ? Utilities.CleanGameName(item.MachineName) : item.MachineName); item.MachineName = (clean ? Utilities.CleanGameName(item.MachineName) : item.MachineName);