From 2619dccf3c44a38c7514c3db29d871d0640e83cb Mon Sep 17 00:00:00 2001 From: Mohit Agarwal Date: Mon, 16 Nov 2015 20:59:35 +0530 Subject: path/filepath: in Rel use case-insensitive comparison on Windows Compare basepath and targetpath using strings.EqualFold. The absence of this on Windows causes an unterminating condition in `for` statement later in the function. Fixes #13258 Change-Id: Ib5a0caba864ee425dc75ece47b9cf6fb626f47f1 Reviewed-on: https://go-review.googlesource.com/16857 Run-TryBot: Alex Brainman TryBot-Result: Gobot Gobot Reviewed-by: Alex Brainman --- src/path/filepath/path_test.go | 2 ++ 1 file changed, 2 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 057aa6a2c0..e41a97da11 100644 --- a/src/path/filepath/path_test.go +++ b/src/path/filepath/path_test.go @@ -1034,6 +1034,8 @@ var winreltests = []RelTests{ {`C:\`, `D:\`, `err`}, {`C:`, `D:`, `err`}, {`C:\Projects`, `c:\projects\src`, `src`}, + {`C:\Projects`, `c:\projects`, `.`}, + {`C:\Projects\a\..`, `c:\projects`, `.`}, } func TestRel(t *testing.T) { -- cgit v1.3-5-g9baa