From 3f80755a3b6984993b50e6c329a37b2eab301cf2 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 25 May 2016 00:03:02 -0700 Subject: [PATCH] Don't write out unless we need to --- Filter/Filter.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Filter/Filter.cs b/Filter/Filter.cs index 8fe287e6..2425b919 100644 --- a/Filter/Filter.cs +++ b/Filter/Filter.cs @@ -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; } } }