Don't write out unless we need to

This commit is contained in:
Matt Nadareski
2016-05-25 00:03:02 -07:00
parent 472e25ba47
commit 3f80755a3b

View File

@@ -383,8 +383,14 @@ namespace SabreTools
datdata.Description += " (Filtered)";
datdata.Roms = dict;
// Now write the file out and return
return Output.WriteDatfile(datdata, _outdir, _logger);
// Now write the file out if anything is there and return
if (datdata.Roms.Count > 0)
{
return Output.WriteDatfile(datdata, _outdir, _logger);
}
// Otherwise, we return true because we did all we could
return true;
}
}
}