Output only if there's something worth outputting

This commit is contained in:
Matt Nadareski
2016-05-20 23:38:49 -07:00
parent 30752d8c0e
commit cacfef630f

View File

@@ -280,9 +280,18 @@ namespace SabreTools
// Now, output all of the files to the output directory
_logger.User("DAT information created, outputting new files");
bool success = true;
if (sha1.Roms.Count > 0)
{
success &= Output.WriteDatfile(sha1, outdir, _logger);
}
if (md5.Roms.Count > 0)
{
success &= Output.WriteDatfile(md5, outdir, _logger);
}
if (crc.Roms.Count > 0)
{
success &= Output.WriteDatfile(crc, outdir, _logger);
}
return success;
}