Skip to content

Commit 32fc6a5

Browse files
committed
normalize
1 parent 12a8d44 commit 32fc6a5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/functions/Coverage.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,10 @@ function Get-ReportRoot {
732732
function Get-RelativePath {
733733
param ( [string] $Path, [string] $RelativeTo )
734734
if ([System.IO.Path]::DirectorySeparatorChar -eq '/') {
735-
# On Unix, also trim the alternate directory separator char, since both are used as separators
736735
$RelativeTo = $RelativeTo.Replace('\', '/').TrimEnd('/')
737736
}
738737
else {
739-
$RelativeTo = $RelativeTo.Replace('\').TrimEnd('\')
738+
$RelativeTo = $RelativeTo.Replace('/', '\').TrimEnd('\')
740739
}
741740

742741
return $Path -replace "^$([regex]::Escape("$RelativeTo$([System.IO.Path]::DirectorySeparatorChar)"))?"

0 commit comments

Comments
 (0)