Removes Windows path adjustment for prefixes (#3614)

This commit is contained in:
ebozduman
2021-11-14 21:21:00 -08:00
committed by GitHub
parent 6460d2facf
commit 7fd441ec6c
-7
View File
@@ -21,7 +21,6 @@ import (
"context"
"fmt"
"path/filepath"
"runtime"
"sort"
"strings"
"time"
@@ -91,12 +90,6 @@ func (c contentMessage) JSON() string {
func getOSDependantKey(path string, isDir bool) string {
sep := "/"
// for windows make sure to print in 'windows' specific style.
if runtime.GOOS == "windows" {
path = strings.Replace(path, "/", "\\", -1)
sep = "\\"
}
if isDir && !strings.HasSuffix(path, sep) {
return fmt.Sprintf("%s%s", path, sep)
}