Skip to content

Commit f87cbd9

Browse files
committed
[testing] fix test on windows
1 parent 528985a commit f87cbd9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/filters/fileserver/fileserver_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,11 @@ func TestFileServer(t *testing.T) {
341341
}
342342

343343
func toWindowsPath(path string) string {
344+
newPath := path
344345
if strings.HasPrefix(path, "/") {
345-
path, _ = filepath.Abs(path)
346+
newPath, _ = filepath.Abs(path)
346347
}
347-
newPath := filepath.FromSlash(path)
348+
newPath = filepath.FromSlash(newPath)
348349
if strings.HasSuffix(path, "/") {
349350
newPath += string(os.PathSeparator)
350351
}

0 commit comments

Comments
 (0)