[DATFromDir] Romba ignores empty folders

This commit is contained in:
Matt Nadareski
2016-06-01 11:02:52 -07:00
parent 353c442166
commit 12584e5cc3

View File

@@ -379,7 +379,9 @@ namespace SabreTools
}
}
// Now output any empties to the stream
// Now output any empties to the stream (if not in Romba mode)
if (!_datdata.Romba)
{
foreach (List<RomData> roms in _datdata.Roms.Values)
{
for (int i = 0; i < roms.Count; i++)
@@ -421,10 +423,11 @@ namespace SabreTools
}
// If we had roms but not blanks (and not in Romba mode), create an artifical rom for the purposes of outputting
if (lastparent != null && _datdata.Roms.Count == 0 && !_datdata.Romba)
if (lastparent != null && _datdata.Roms.Count == 0)
{
_datdata.Roms.Add("temp", new List<RomData>());
}
}
// Now write the final piece and close the output stream
Output.WriteFooter(sw, _datdata, 0, _logger);