From 3eda785a5a585696d6c116d24a036d39177d1a4b Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 31 Oct 2020 14:16:51 -0700 Subject: [PATCH] Skip files with no protection on output --- Test/Program.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Test/Program.cs b/Test/Program.cs index ac68f297..57f99fd8 100644 --- a/Test/Program.cs +++ b/Test/Program.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Linq; using BurnOutSharp; namespace Test @@ -29,6 +30,10 @@ namespace Test { foreach (string key in protections.Keys) { + // Skip over files with no protection + if (protections[key] == null || !protections[key].Any()) + continue; + string line = $"{key}: {string.Join(", ", protections[key])}"; Console.WriteLine(line); sw.WriteLine(line);