From 9cd1818a7d019c02fa4898b3e45a323e35033290 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 22 Apr 2022 10:07:51 +0900 Subject: path/filepath: do not remove prefix "." when following path contains ":". Fixes #52476 Change-Id: I9eb72ac7dbccd6322d060291f31831dc389eb9bb Reviewed-on: https://go-review.googlesource.com/c/go/+/401595 Auto-Submit: Ian Lance Taylor Reviewed-by: Alex Brainman Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Damien Neil TryBot-Result: Gopher Robot --- src/path/filepath/path_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/path/filepath/path_test.go') diff --git a/src/path/filepath/path_test.go b/src/path/filepath/path_test.go index 1456ea737a..a783d6be28 100644 --- a/src/path/filepath/path_test.go +++ b/src/path/filepath/path_test.go @@ -93,6 +93,9 @@ var wincleantests = []PathTest{ {`//host/share/foo/../baz`, `\\host\share\baz`}, {`\\a\b\..\c`, `\\a\b\c`}, {`\\a\b`, `\\a\b`}, + {`.\c:`, `.\c:`}, + {`.\c:\foo`, `.\c:\foo`}, + {`.\c:foo`, `.\c:foo`}, } func TestClean(t *testing.T) { -- cgit v1.3