From 38f4c57588aef01918314f053723e31d2452217e Mon Sep 17 00:00:00 2001 From: Jacques Eloff Date: Fri, 9 Nov 2018 08:00:24 -0800 Subject: [PATCH] Exclude log files #1300 --- src/SignCheck/SignCheck/SignCheck.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/SignCheck/SignCheck/SignCheck.cs b/src/SignCheck/SignCheck/SignCheck.cs index 19dcb3ac28a..a7109e38d30 100644 --- a/src/SignCheck/SignCheck/SignCheck.cs +++ b/src/SignCheck/SignCheck/SignCheck.cs @@ -277,6 +277,17 @@ private List GetInputFilesFromOptions() DownloadFilesAsync(downloadFiles).Wait(); } + // Exclude log files in case they are created in the folder being scanned. + if (!String.IsNullOrEmpty(Options.ErrorLogFile)) + { + inputFiles.Remove(Path.GetFullPath(Options.ErrorLogFile)); + } + + if (!String.IsNullOrEmpty(Options.LogFile)) + { + inputFiles.Remove(Path.GetFullPath(Options.LogFile)); + } + return inputFiles; }