From c6b1ad44c4006bf0bc0bb697a88463d7db379c1b Mon Sep 17 00:00:00 2001 From: SlowLogicBoy Date: Wed, 7 Nov 2018 10:53:43 +0200 Subject: [PATCH] Fix Exclude File when full path contains traversals --- src/coverlet.core/Helpers/InstrumentationHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coverlet.core/Helpers/InstrumentationHelper.cs b/src/coverlet.core/Helpers/InstrumentationHelper.cs index ea1fc19e1..7c2b04c2e 100644 --- a/src/coverlet.core/Helpers/InstrumentationHelper.cs +++ b/src/coverlet.core/Helpers/InstrumentationHelper.cs @@ -200,7 +200,7 @@ public static string[] GetExcludedFiles(string[] excludes) { matcherDict.Add(root, new Matcher()); } - matcherDict[root].AddInclude(excludeRule.Substring(root.Length)); + matcherDict[root].AddInclude(Path.GetFullPath(excludeRule).Substring(root.Length)); } else {