Skip to content

Commit

Permalink
Merge branch 'fix/coberturaPath' of https://github.com/jeremybeier/Re…
Browse files Browse the repository at this point in the history
…portGenerator into develop
  • Loading branch information
danielpalme committed Apr 24, 2021
2 parents f801790 + a88324a commit 05f975e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ CHANGELOG
4.8.8.0

* Fix: Updated Angular Components (dropped support for IE)
* Fix: #418: Cobertura: Clean up directory separators before path combine

4.8.7.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@ internal void Execute(XContainer report)
continue;
}

string path = Path.Combine(sources[0], fileNameAttribute.Value)
string sourcePath = sources[0]
.Replace('\\', Path.DirectorySeparatorChar)
.Replace('/', Path.DirectorySeparatorChar);

string fileName = fileNameAttribute.Value
.Replace('\\', Path.DirectorySeparatorChar)
.Replace('/', Path.DirectorySeparatorChar);

string path = Path.Combine(sourcePath, fileName);
fileNameAttribute.Value = path;
}
}
Expand All @@ -90,10 +96,16 @@ internal void Execute(XContainer report)

foreach (var source in sources)
{
string path = Path.Combine(source, fileNameAttribute.Value)
string sourcePath = source
.Replace('\\', Path.DirectorySeparatorChar)
.Replace('/', Path.DirectorySeparatorChar);

string fileName = fileNameAttribute.Value
.Replace('\\', Path.DirectorySeparatorChar)
.Replace('/', Path.DirectorySeparatorChar);

string path = Path.Combine(sourcePath, fileName);

if (File.Exists(path))
{
fileNameAttribute.Value = path;
Expand Down

0 comments on commit 05f975e

Please sign in to comment.